Title: [195322] trunk
Revision
195322
Author
[email protected]
Date
2016-01-19 16:17:47 -0800 (Tue, 19 Jan 2016)

Log Message

LayoutTests/imported/w3c:
Document.createDocument() should treat undefined namespace as null
https://bugs.webkit.org/show_bug.cgi?id=153252

Reviewed by Ryosuke Niwa.

Rebaseline W3C DOM test now that more checks are passing.

* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:

Source/WebCore:
DOMImplementation.createDocument() should treat undefined namespace as null
https://bugs.webkit.org/show_bug.cgi?id=153252

Reviewed by Ryosuke Niwa.

DOMImplementation.createDocument() should treat undefined namespace as null as
the DOMString parameter is nullable:
https://dom.spec.whatwg.org/#domimplementation

Firefox behaves according to the specification, Chrome does not.

No new tests, already covered by existing test.

* dom/DOMImplementation.idl:

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (195321 => 195322)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-01-19 23:41:11 UTC (rev 195321)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-01-20 00:17:47 UTC (rev 195322)
@@ -1,3 +1,14 @@
+2016-01-19  Chris Dumez  <[email protected]>
+
+        Document.createDocument() should treat undefined namespace as null
+        https://bugs.webkit.org/show_bug.cgi?id=153252
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline W3C DOM test now that more checks are passing.
+
+        * web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
+
 2016-01-19  Ryosuke Niwa  <[email protected]>
 
         Text::splitText doesn't update Range end points anchored on parent nodes

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt (195321 => 195322)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt	2016-01-19 23:41:11 UTC (rev 195321)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt	2016-01-20 00:17:47 UTC (rev 195322)
@@ -44,32 +44,32 @@
 PASS createDocument test 29: "",":foo",null,"NAMESPACE_ERR" 
 PASS createDocument test 30: "","f:oo",null,"NAMESPACE_ERR" 
 PASS createDocument test 31: "","foo:",null,"NAMESPACE_ERR" 
-FAIL createDocument test 32: undefined,undefined,null,null assert_equals: expected (object) null but got (string) "undefined"
+PASS createDocument test 32: undefined,undefined,null,null 
 FAIL createDocument test 32: metadata for undefined,undefined,null assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 32: characterSet aliases for undefined,undefined,null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
-FAIL createDocument test 33: undefined,"foo",null,null assert_equals: expected (object) null but got (string) "undefined"
+PASS createDocument test 33: undefined,"foo",null,null 
 FAIL createDocument test 33: metadata for undefined,"foo",null assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 33: characterSet aliases for undefined,"foo",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
 PASS createDocument test 34: undefined,"1foo",null,"INVALID_CHARACTER_ERR" 
-FAIL createDocument test 35: undefined,"f1oo",null,null assert_equals: expected (object) null but got (string) "undefined"
+PASS createDocument test 35: undefined,"f1oo",null,null 
 FAIL createDocument test 35: metadata for undefined,"f1oo",null assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 35: characterSet aliases for undefined,"f1oo",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
-FAIL createDocument test 36: undefined,"foo1",null,null assert_equals: expected (object) null but got (string) "undefined"
+PASS createDocument test 36: undefined,"foo1",null,null 
 FAIL createDocument test 36: metadata for undefined,"foo1",null assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 36: characterSet aliases for undefined,"foo1",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
 PASS createDocument test 37: undefined,":foo",null,"NAMESPACE_ERR" 
-FAIL createDocument test 38: undefined,"f:oo",null,"NAMESPACE_ERR" assert_throws: function "function () { document.implementation.createDocument(name..." did not throw
+PASS createDocument test 38: undefined,"f:oo",null,"NAMESPACE_ERR" 
 PASS createDocument test 39: undefined,"foo:",null,"NAMESPACE_ERR" 
-FAIL createDocument test 40: undefined,"xml",null,null assert_equals: expected (object) null but got (string) "undefined"
+PASS createDocument test 40: undefined,"xml",null,null 
 FAIL createDocument test 40: metadata for undefined,"xml",null assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 40: characterSet aliases for undefined,"xml",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
 PASS createDocument test 41: undefined,"xmlns",null,"NAMESPACE_ERR" 
-FAIL createDocument test 42: undefined,"xmlfoo",null,null assert_equals: expected (object) null but got (string) "undefined"
+PASS createDocument test 42: undefined,"xmlfoo",null,null 
 FAIL createDocument test 42: metadata for undefined,"xmlfoo",null assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 42: characterSet aliases for undefined,"xmlfoo",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
 PASS createDocument test 43: undefined,"xml:foo",null,"NAMESPACE_ERR" 
 PASS createDocument test 44: undefined,"xmlns:foo",null,"NAMESPACE_ERR" 
-FAIL createDocument test 45: undefined,"xmlfoo:bar",null,"NAMESPACE_ERR" assert_throws: function "function () { document.implementation.createDocument(name..." did not throw
+PASS createDocument test 45: undefined,"xmlfoo:bar",null,"NAMESPACE_ERR" 
 PASS createDocument test 46: "http://example.com/","foo",null,null 
 FAIL createDocument test 46: metadata for "http://example.com/","foo",null assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 46: characterSet aliases for "http://example.com/","foo",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
@@ -277,7 +277,7 @@
 PASS createDocument test 158: undefined,null,undefined,null 
 FAIL createDocument test 158: metadata for undefined,null,undefined assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 158: characterSet aliases for undefined,null,undefined assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
-FAIL createDocument test 159: undefined,undefined,undefined,null assert_equals: expected (object) null but got (string) "undefined"
+PASS createDocument test 159: undefined,undefined,undefined,null 
 FAIL createDocument test 159: metadata for undefined,undefined,undefined assert_equals: expected "about:blank" but got ""
 FAIL createDocument test 159: characterSet aliases for undefined,undefined,undefined assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
 PASS createDocument test 160: undefined,"",undefined,null 

Modified: trunk/Source/WebCore/ChangeLog (195321 => 195322)


--- trunk/Source/WebCore/ChangeLog	2016-01-19 23:41:11 UTC (rev 195321)
+++ trunk/Source/WebCore/ChangeLog	2016-01-20 00:17:47 UTC (rev 195322)
@@ -1,3 +1,20 @@
+2016-01-19  Chris Dumez  <[email protected]>
+
+        DOMImplementation.createDocument() should treat undefined namespace as null
+        https://bugs.webkit.org/show_bug.cgi?id=153252
+
+        Reviewed by Ryosuke Niwa.
+
+        DOMImplementation.createDocument() should treat undefined namespace as null as
+        the DOMString parameter is nullable:
+        https://dom.spec.whatwg.org/#domimplementation
+
+        Firefox behaves according to the specification, Chrome does not.
+
+        No new tests, already covered by existing test.
+
+        * dom/DOMImplementation.idl:
+
 2016-01-19  Enrica Casucci  <[email protected]>
 
         Add support for DataDetectors in WK (iOS).

Modified: trunk/Source/WebCore/dom/DOMImplementation.idl (195321 => 195322)


--- trunk/Source/WebCore/dom/DOMImplementation.idl	2016-01-19 23:41:11 UTC (rev 195321)
+++ trunk/Source/WebCore/dom/DOMImplementation.idl	2016-01-20 00:17:47 UTC (rev 195322)
@@ -33,7 +33,7 @@
     [ObjCLegacyUnnamedParameters, RaisesException, NewObject] DocumentType createDocumentType([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString qualifiedName,
                                                    [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString publicId,
                                                    [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString systemId);
-    [ObjCLegacyUnnamedParameters, RaisesException, NewObject] Document createDocument([TreatNullAs=NullString, Default=Undefined] optional DOMString namespaceURI,
+    [ObjCLegacyUnnamedParameters, RaisesException, NewObject] Document createDocument([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
                                            [TreatNullAs=NullString, Default=Undefined] optional DOMString qualifiedName, 
                                            [TreatNullAs=NullString, Default=Undefined] optional DocumentType doctype);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to