Changeset 85142 in webkit


Ignore:
Timestamp:
Apr 27, 2011 8:18:18 PM (13 years ago)
Author:
robert@webkit.org
Message:

2011-04-27 Robert Hogan <robert@webkit.org>

Reviewed by Adam Barth.

Allow shadowing of history object
https://bugs.webkit.org/show_bug.cgi?id=55965

  • fast/dom/Window/get-set-properties-expected.txt:
  • fast/dom/Window/get-set-properties.html:
  • fast/dom/Window/window-property-shadowing-expected.txt:
  • fast/dom/Window/window-property-shadowing.html:
  • fast/js/var-declarations-shadowing-expected.txt:
  • fast/js/var-declarations-shadowing.html:
  • http/tests/history/cross-origin-replace-history-object-child-expected.txt: Added.
  • http/tests/history/cross-origin-replace-history-object-child.html: Added.
  • http/tests/history/cross-origin-replace-history-object-expected.txt: Added.
  • http/tests/history/cross-origin-replace-history-object.html: Added.
  • http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html: Added.
  • http/tests/history/resources/cross-origin-replaces-history-object-iframe.html: Added.
  • http/tests/security/cross-frame-access-put-expected.txt: Note that a window property with the DoNotCheckDomainSecurityOnGet attribute generates two cross-origin JS warnings. Amended expected results to include the additional extra warning for the history object.

2011-04-27 Robert Hogan <robert@webkit.org>

Reviewed by Adam Barth.

Allow shadowing of history object
https://bugs.webkit.org/show_bug.cgi?id=55965

Tests: http/tests/history/cross-origin-replace-history-object-child.html

http/tests/history/cross-origin-replace-history-object.html

  • page/DOMWindow.idl:
Location:
trunk
Files:
6 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r85141 r85142  
     12011-04-27  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Allow shadowing of history object
     6        https://bugs.webkit.org/show_bug.cgi?id=55965
     7
     8        * fast/dom/Window/get-set-properties-expected.txt:
     9        * fast/dom/Window/get-set-properties.html:
     10        * fast/dom/Window/window-property-shadowing-expected.txt:
     11        * fast/dom/Window/window-property-shadowing.html:
     12        * fast/js/var-declarations-shadowing-expected.txt:
     13        * fast/js/var-declarations-shadowing.html:
     14        * http/tests/history/cross-origin-replace-history-object-child-expected.txt: Added.
     15        * http/tests/history/cross-origin-replace-history-object-child.html: Added.
     16        * http/tests/history/cross-origin-replace-history-object-expected.txt: Added.
     17        * http/tests/history/cross-origin-replace-history-object.html: Added.
     18        * http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html: Added.
     19        * http/tests/history/resources/cross-origin-replaces-history-object-iframe.html: Added.
     20        * http/tests/security/cross-frame-access-put-expected.txt: Note that a window property with
     21          the DoNotCheckDomainSecurityOnGet attribute generates two cross-origin JS warnings. Amended
     22          expected results to include the additional extra warning for the history object.
     23
    1242011-04-27  Dirk Pranke  <dpranke@chromium.org>
    225
  • trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt

    r39097 r85142  
    218218PASS: canGet('frames') should be 'true' and is.
    219219PASS: canSet('frames') should be 'true' and is.
     220PASS: canGet('history') should be 'true' and is.
     221PASS: canSet('history') should be 'true' and is.
    220222PASS: canGet('innerHeight') should be 'true' and is.
    221223PASS: canSet('innerHeight') should be 'true' and is.
     
    271273PASS: canGet('document') should be 'true' and is.
    272274PASS: canSet('document') should be 'false' and is.
    273 PASS: canGet('history') should be 'true' and is.
    274 PASS: canSet('history') should be 'false' and is.
    275275PASS: canGet('pageXOffset') should be 'true' and is.
    276276PASS: canSet('pageXOffset') should be 'false' and is.
  • trunk/LayoutTests/fast/dom/Window/get-set-properties.html

    r30238 r85142  
    177177    "event",
    178178    "frames",
     179    "history",
    179180    "innerHeight",
    180181    "innerWidth",
     
    205206    "closed",
    206207    "document",
    207     "history",
    208208    "pageXOffset",
    209209    "pageYOffset",
  • trunk/LayoutTests/fast/dom/Window/window-property-shadowing-expected.txt

    r67100 r85142  
    3030PASS: self successfully shadowed
    3131PASS: top successfully shadowed
     32PASS: history successfully shadowed
    3233PASS: getSelection successfully shadowed
    3334PASS: getComputedStyle successfully shadowed
  • trunk/LayoutTests/fast/dom/Window/window-property-shadowing.html

    r67100 r85142  
    7878        var top = 1;
    7979        log(top == 1 ? "PASS: top successfully shadowed" : "FAIL: top was not shadowed");
     80        var history = 1;
     81        log(history == 1 ? "PASS: history successfully shadowed" : "FAIL: history was not shadowed");
    8082
    8183        // Window functions
  • trunk/LayoutTests/fast/js/var-declarations-shadowing-expected.txt

    r67100 r85142  
    8383PASS: screen == marker should be true and is.
    8484PASS: eval('screen == marker') should be true and is.
     85PASS: history == marker should be true and is.
     86PASS: eval('history == marker') should be true and is.
    8587-----
    86 PASS: history == marker should be false and is.
    87 PASS: eval('history == marker') should be false and is.
    8888PASS: frameElement == marker should be false and is.
    8989PASS: eval('frameElement == marker') should be false and is.
  • trunk/LayoutTests/fast/js/var-declarations-shadowing.html

    r67100 r85142  
    260260shouldBe(eval('screen == marker'), "eval('screen == marker')", true);
    261261
     262try {
     263    eval("var history = marker");
     264} catch(e) { }
     265shouldBe(history == marker, "history == marker", true);
     266shouldBe(eval('history == marker'), "eval('history == marker')", true);
     267
    262268log("-----");
    263 
    264 try {
    265     eval("var history = marker");
    266 } catch(e) { }
    267 shouldBe(history == marker, "history == marker", false);
    268 shouldBe(eval('history == marker'), "eval('history == marker')", false);
    269269
    270270try {
  • trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt

    r78330 r85142  
    11CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html from frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html. Domains, protocols and ports must match.
     2
     3CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match.
    24
    35CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match.
  • trunk/Source/WebCore/ChangeLog

    r85136 r85142  
     12011-04-27  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Allow shadowing of history object
     6        https://bugs.webkit.org/show_bug.cgi?id=55965
     7
     8        Tests: http/tests/history/cross-origin-replace-history-object-child.html
     9               http/tests/history/cross-origin-replace-history-object.html
     10
     11        * page/DOMWindow.idl:
     12
    1132011-04-27  James Robinson  <jamesr@chromium.org>
    214
  • trunk/Source/WebCore/page/DOMWindow.idl

    r84991 r85142  
    4646        // DOM Level 0
    4747        attribute [Replaceable] Screen screen;
    48         readonly attribute [DoNotCheckDomainSecurity, JSCCustomGetter] History history;
     48        attribute [Replaceable, DoNotCheckDomainSecurityOnGet, JSCCustomGetter] History history;
    4949        attribute [Replaceable] BarInfo locationbar;
    5050        attribute [Replaceable] BarInfo menubar;
Note: See TracChangeset for help on using the changeset viewer.