Title: [196742] trunk
Revision
196742
Author
[email protected]
Date
2016-02-17 21:44:10 -0800 (Wed, 17 Feb 2016)

Log 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.

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (196741 => 196742)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-02-18 05:27:31 UTC (rev 196741)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-02-18 05:44:10 UTC (rev 196742)
@@ -1,5 +1,16 @@
 2016-02-17  Chris Dumez  <[email protected]>
 
+        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.
+
+        Rebaseline now that more checks are passing.
+
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-02-17  Chris Dumez  <[email protected]>
+
         Import W3C HTML reflection tests
         https://bugs.webkit.org/show_bug.cgi?id=154310
         <rdar://problem/24685826>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (196741 => 196742)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-02-18 05:27:31 UTC (rev 196741)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-02-18 05:44:10 UTC (rev 196742)
@@ -4147,13 +4147,9 @@
 PASS Location interface: window.location must have own property "search" 
 PASS Location interface: window.location must have own property "hash" 
 FAIL 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
-FAIL Location interface: calling assign(USVString) on window.location with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-    [native code]
-}" did not throw
+PASS Location interface: calling assign(USVString) on window.location with too few arguments must throw TypeError 
 FAIL 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
-FAIL Location interface: calling replace(USVString) on window.location with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-    [native code]
-}" did not throw
+PASS Location interface: calling replace(USVString) on window.location with too few arguments must throw TypeError 
 FAIL 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
 PASS Location interface: window.location must have own property "ancestorOrigins" 
 PASS PopStateEvent interface: existence and properties of interface object 

Modified: trunk/Source/WebCore/ChangeLog (196741 => 196742)


--- trunk/Source/WebCore/ChangeLog	2016-02-18 05:27:31 UTC (rev 196741)
+++ trunk/Source/WebCore/ChangeLog	2016-02-18 05:44:10 UTC (rev 196742)
@@ -1,3 +1,34 @@
+2016-02-17  Chris Dumez  <[email protected]>
+
+        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.
+
+        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.
+
 2016-02-17  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r196738.

Modified: trunk/Source/WebCore/page/Location.idl (196741 => 196742)


--- trunk/Source/WebCore/page/Location.idl	2016-02-18 05:27:31 UTC (rev 196741)
+++ trunk/Source/WebCore/page/Location.idl	2016-02-18 05:44:10 UTC (rev 196742)
@@ -39,8 +39,8 @@
 ] interface Location {
     [SetterCallWith=ActiveWindow&FirstWindow] attribute DOMString href;
 
-    [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void assign([Default=Undefined] optional DOMString url);
-    [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void replace([Default=Undefined] optional DOMString url);
+    [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void assign(DOMString url);
+    [CallWith=ActiveWindow&FirstWindow, ForwardDeclareInHeader] void replace(DOMString url);
     [CallWith=ActiveWindow, ForwardDeclareInHeader] void reload();
 
     // URI decomposition attributes
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to