Changeset 196742 in webkit


Ignore:
Timestamp:
Feb 17, 2016 9:44:10 PM (8 years ago)
Author:
Chris Dumez
Message:

Regression(r196648): http://w3c-test.org/html/dom/interfaces.html redirects at the end of the test
https://bugs.webkit.org/show_bug.cgi?id=154357

Reviewed by Alexey Proskuryakov.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

  • web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Make location.assign() / location.replace()'s parameter mandatory,
as per the specification:
https://html.spec.whatwg.org/multipage/browsers.html#the-location-interface

Previously, calling location.assign() / location.replace() without
parameter would be identical to calling location.assign("undefined") /
location.replace("undefined"), which is not useful.

After r196648, http://w3c-test.org/html/dom/interfaces.html was able to
test location.assign() / location.replace() further because they are now
on the instance (where they should be) instead of the prototype. One of
these tests calls these functions without parameter, expecting them to
throw an exception. However, in WebKit, it would not throw and it would
redirect us to http://w3c-test.org/html/dom/undefined.

Firefox and Chrome both follow the specification already and throw in
this case.

No new tests, already covered by existing test.

  • page/Location.idl:

Make location.assign() / location.replace()'s parameter mandatory,
as per the specification.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r196710 r196742  
     12016-02-17  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r196648): http://w3c-test.org/html/dom/interfaces.html redirects at the end of the test
     4        https://bugs.webkit.org/show_bug.cgi?id=154357
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Rebaseline now that more checks are passing.
     9
     10        * web-platform-tests/html/dom/interfaces-expected.txt:
     11
    1122016-02-17  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r196690 r196742  
    41484148PASS Location interface: window.location must have own property "hash"
    41494149FAIL Location interface: window.location must have own property "assign" assert_equals: property should be writable if and only if not unforgeable expected false but got true
    4150 FAIL Location interface: calling assign(USVString) on window.location with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
    4151     [native code]
    4152 }" did not throw
     4150PASS Location interface: calling assign(USVString) on window.location with too few arguments must throw TypeError
    41534151FAIL Location interface: window.location must have own property "replace" assert_equals: property should be writable if and only if not unforgeable expected false but got true
    4154 FAIL Location interface: calling replace(USVString) on window.location with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
    4155     [native code]
    4156 }" did not throw
     4152PASS Location interface: calling replace(USVString) on window.location with too few arguments must throw TypeError
    41574153FAIL Location interface: window.location must have own property "reload" assert_equals: property should be writable if and only if not unforgeable expected false but got true
    41584154PASS Location interface: window.location must have own property "ancestorOrigins"
  • trunk/Source/WebCore/ChangeLog

    r196740 r196742  
     12016-02-17  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r196648): http://w3c-test.org/html/dom/interfaces.html redirects at the end of the test
     4        https://bugs.webkit.org/show_bug.cgi?id=154357
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Make location.assign() / location.replace()'s parameter mandatory,
     9        as per the specification:
     10        https://html.spec.whatwg.org/multipage/browsers.html#the-location-interface
     11
     12        Previously, calling location.assign() / location.replace() without
     13        parameter would be identical to calling location.assign("undefined") /
     14        location.replace("undefined"), which is not useful.
     15
     16        After r196648, http://w3c-test.org/html/dom/interfaces.html was able to
     17        test location.assign() / location.replace() further because they are now
     18        on the instance (where they should be) instead of the prototype. One of
     19        these tests calls these functions without parameter, expecting them to
     20        throw an exception. However, in WebKit, it would not throw and it would
     21        redirect us to http://w3c-test.org/html/dom/undefined.
     22
     23        Firefox and Chrome both follow the specification already and throw in
     24        this case.
     25
     26        No new tests, already covered by existing test.
     27
     28        * page/Location.idl:
     29        Make location.assign() / location.replace()'s parameter mandatory,
     30        as per the specification.
     31
    1322016-02-17  Commit Queue  <commit-queue@webkit.org>
    233
  • trunk/Source/WebCore/page/Location.idl

    r190017 r196742  
    4040    [SetterCallWith=ActiveWindow&FirstWindow] attribute DOMString href;
    4141
    42     [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void assign([Default=Undefined] optional DOMString url);
    43     [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void replace([Default=Undefined] optional DOMString url);
     42    [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void assign(DOMString url);
     43    [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void replace(DOMString url);
    4444    [CallWith=ActiveWindow, ForwardDeclareInHeader] void reload();
    4545
Note: See TracChangeset for help on using the changeset viewer.