Changeset 195322 in webkit


Ignore:
Timestamp:
Jan 19, 2016 4:17:47 PM (8 years ago)
Author:
Chris Dumez
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:
Location:
trunk
Files:
4 edited

Legend:

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

    r195281 r195322  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Document.createDocument() should treat undefined namespace as null
     4        https://bugs.webkit.org/show_bug.cgi?id=153252
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Rebaseline W3C DOM test now that more checks are passing.
     9
     10        * web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
     11
    1122016-01-19  Ryosuke Niwa  <rniwa@webkit.org>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt

    r191379 r195322  
    4545PASS createDocument test 30: "","f:oo",null,"NAMESPACE_ERR"
    4646PASS createDocument test 31: "","foo:",null,"NAMESPACE_ERR"
    47 FAIL createDocument test 32: undefined,undefined,null,null assert_equals: expected (object) null but got (string) "undefined"
     47PASS createDocument test 32: undefined,undefined,null,null
    4848FAIL createDocument test 32: metadata for undefined,undefined,null assert_equals: expected "about:blank" but got ""
    4949FAIL createDocument test 32: characterSet aliases for undefined,undefined,null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
    50 FAIL createDocument test 33: undefined,"foo",null,null assert_equals: expected (object) null but got (string) "undefined"
     50PASS createDocument test 33: undefined,"foo",null,null
    5151FAIL createDocument test 33: metadata for undefined,"foo",null assert_equals: expected "about:blank" but got ""
    5252FAIL createDocument test 33: characterSet aliases for undefined,"foo",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
    5353PASS createDocument test 34: undefined,"1foo",null,"INVALID_CHARACTER_ERR"
    54 FAIL createDocument test 35: undefined,"f1oo",null,null assert_equals: expected (object) null but got (string) "undefined"
     54PASS createDocument test 35: undefined,"f1oo",null,null
    5555FAIL createDocument test 35: metadata for undefined,"f1oo",null assert_equals: expected "about:blank" but got ""
    5656FAIL createDocument test 35: characterSet aliases for undefined,"f1oo",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
    57 FAIL createDocument test 36: undefined,"foo1",null,null assert_equals: expected (object) null but got (string) "undefined"
     57PASS createDocument test 36: undefined,"foo1",null,null
    5858FAIL createDocument test 36: metadata for undefined,"foo1",null assert_equals: expected "about:blank" but got ""
    5959FAIL createDocument test 36: characterSet aliases for undefined,"foo1",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
    6060PASS createDocument test 37: undefined,":foo",null,"NAMESPACE_ERR"
    61 FAIL createDocument test 38: undefined,"f:oo",null,"NAMESPACE_ERR" assert_throws: function "function () { document.implementation.createDocument(name..." did not throw
     61PASS createDocument test 38: undefined,"f:oo",null,"NAMESPACE_ERR"
    6262PASS createDocument test 39: undefined,"foo:",null,"NAMESPACE_ERR"
    63 FAIL createDocument test 40: undefined,"xml",null,null assert_equals: expected (object) null but got (string) "undefined"
     63PASS createDocument test 40: undefined,"xml",null,null
    6464FAIL createDocument test 40: metadata for undefined,"xml",null assert_equals: expected "about:blank" but got ""
    6565FAIL createDocument test 40: characterSet aliases for undefined,"xml",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
    6666PASS createDocument test 41: undefined,"xmlns",null,"NAMESPACE_ERR"
    67 FAIL createDocument test 42: undefined,"xmlfoo",null,null assert_equals: expected (object) null but got (string) "undefined"
     67PASS createDocument test 42: undefined,"xmlfoo",null,null
    6868FAIL createDocument test 42: metadata for undefined,"xmlfoo",null assert_equals: expected "about:blank" but got ""
    6969FAIL createDocument test 42: characterSet aliases for undefined,"xmlfoo",null assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
    7070PASS createDocument test 43: undefined,"xml:foo",null,"NAMESPACE_ERR"
    7171PASS createDocument test 44: undefined,"xmlns:foo",null,"NAMESPACE_ERR"
    72 FAIL createDocument test 45: undefined,"xmlfoo:bar",null,"NAMESPACE_ERR" assert_throws: function "function () { document.implementation.createDocument(name..." did not throw
     72PASS createDocument test 45: undefined,"xmlfoo:bar",null,"NAMESPACE_ERR"
    7373PASS createDocument test 46: "http://example.com/","foo",null,null
    7474FAIL createDocument test 46: metadata for "http://example.com/","foo",null assert_equals: expected "about:blank" but got ""
     
    278278FAIL createDocument test 158: metadata for undefined,null,undefined assert_equals: expected "about:blank" but got ""
    279279FAIL createDocument test 158: characterSet aliases for undefined,null,undefined assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
    280 FAIL createDocument test 159: undefined,undefined,undefined,null assert_equals: expected (object) null but got (string) "undefined"
     280PASS createDocument test 159: undefined,undefined,undefined,null
    281281FAIL createDocument test 159: metadata for undefined,undefined,undefined assert_equals: expected "about:blank" but got ""
    282282FAIL createDocument test 159: characterSet aliases for undefined,undefined,undefined assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
  • trunk/Source/WebCore/ChangeLog

    r195317 r195322  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        DOMImplementation.createDocument() should treat undefined namespace as null
     4        https://bugs.webkit.org/show_bug.cgi?id=153252
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        DOMImplementation.createDocument() should treat undefined namespace as null as
     9        the DOMString parameter is nullable:
     10        https://dom.spec.whatwg.org/#domimplementation
     11
     12        Firefox behaves according to the specification, Chrome does not.
     13
     14        No new tests, already covered by existing test.
     15
     16        * dom/DOMImplementation.idl:
     17
    1182016-01-19  Enrica Casucci  <enrica@apple.com>
    219
  • trunk/Source/WebCore/dom/DOMImplementation.idl

    r189881 r195322  
    3434                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString publicId,
    3535                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString systemId);
    36     [ObjCLegacyUnnamedParameters, RaisesException, NewObject] Document createDocument([TreatNullAs=NullString, Default=Undefined] optional DOMString namespaceURI,
     36    [ObjCLegacyUnnamedParameters, RaisesException, NewObject] Document createDocument([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
    3737                                           [TreatNullAs=NullString, Default=Undefined] optional DOMString qualifiedName,
    3838                                           [TreatNullAs=NullString, Default=Undefined] optional DocumentType doctype);
Note: See TracChangeset for help on using the changeset viewer.