Changeset 196079 in webkit


Ignore:
Timestamp:
Feb 3, 2016 1:54:36 PM (8 years ago)
Author:
Chris Dumez
Message:

Re-sync W3C DOM web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=153831

Reviewed by Darin Adler.

Re-sync W3C DOM web-platform-tests from:
https://github.com/w3c/web-platform-tests/tree/master/dom

  • web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt: Added.
  • web-platform-tests/dom/collections/domstringmap-supported-property-names.html: Added.
  • web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt: Added.
  • web-platform-tests/dom/collections/namednodemap-supported-property-names.html: Added.
  • web-platform-tests/dom/collections/w3c-import.log:
  • web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt: Added.
  • web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html: Added.
  • web-platform-tests/dom/events/w3c-import.log:
  • web-platform-tests/dom/historical-expected.txt:
  • web-platform-tests/dom/historical.html:
  • web-platform-tests/dom/interface-objects-expected.txt:
  • web-platform-tests/dom/interface-objects.html:
  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/dom/interfaces.html:
  • web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
  • web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
  • web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html: Added.
  • web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg: Added.
  • web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml: Added.
  • web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml: Added.
  • web-platform-tests/dom/nodes/Element-classlist-expected.txt:
  • web-platform-tests/dom/nodes/Element-classlist.html:
  • web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt: Added.
  • web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml: Added.
  • web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt:
  • web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt.
  • web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml.
  • web-platform-tests/dom/nodes/Node-isEqualNode.html: Added.
  • web-platform-tests/dom/nodes/attributes-expected.txt:
  • web-platform-tests/dom/nodes/attributes.html:
  • web-platform-tests/dom/nodes/w3c-import.log:
  • web-platform-tests/dom/ranges/Range-constructor-expected.txt: Added.
  • web-platform-tests/dom/ranges/Range-constructor.html: Added.
  • web-platform-tests/dom/ranges/w3c-import.log:
  • web-platform-tests/dom/w3c-import.log:
Location:
trunk/LayoutTests/imported/w3c
Files:
11 added
18 edited
1 copied
1 moved

Legend:

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

    r196001 r196079  
     12016-02-03  Chris Dumez  <cdumez@apple.com>
     2
     3        Re-sync W3C DOM web-platform-tests
     4        https://bugs.webkit.org/show_bug.cgi?id=153831
     5
     6        Reviewed by Darin Adler.
     7
     8        Re-sync W3C DOM web-platform-tests from:
     9        https://github.com/w3c/web-platform-tests/tree/master/dom
     10
     11        * web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt: Added.
     12        * web-platform-tests/dom/collections/domstringmap-supported-property-names.html: Added.
     13        * web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt: Added.
     14        * web-platform-tests/dom/collections/namednodemap-supported-property-names.html: Added.
     15        * web-platform-tests/dom/collections/w3c-import.log:
     16        * web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt: Added.
     17        * web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html: Added.
     18        * web-platform-tests/dom/events/w3c-import.log:
     19        * web-platform-tests/dom/historical-expected.txt:
     20        * web-platform-tests/dom/historical.html:
     21        * web-platform-tests/dom/interface-objects-expected.txt:
     22        * web-platform-tests/dom/interface-objects.html:
     23        * web-platform-tests/dom/interfaces-expected.txt:
     24        * web-platform-tests/dom/interfaces.html:
     25        * web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
     26        * web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
     27        * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html: Added.
     28        * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg: Added.
     29        * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml: Added.
     30        * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml: Added.
     31        * web-platform-tests/dom/nodes/Element-classlist-expected.txt:
     32        * web-platform-tests/dom/nodes/Element-classlist.html:
     33        * web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt: Added.
     34        * web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml: Added.
     35        * web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt:
     36        * web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt.
     37        * web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml.
     38        * web-platform-tests/dom/nodes/Node-isEqualNode.html: Added.
     39        * web-platform-tests/dom/nodes/attributes-expected.txt:
     40        * web-platform-tests/dom/nodes/attributes.html:
     41        * web-platform-tests/dom/nodes/w3c-import.log:
     42        * web-platform-tests/dom/ranges/Range-constructor-expected.txt: Added.
     43        * web-platform-tests/dom/ranges/Range-constructor.html: Added.
     44        * web-platform-tests/dom/ranges/w3c-import.log:
     45        * web-platform-tests/dom/w3c-import.log:
     46
    1472016-02-01  Chris Dumez  <cdumez@apple.com>
    248
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/w3c-import.log

    r191379 r196079  
    1818/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-empty-name.html
    1919/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-supported-property-names.html
     20/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names.html
     21/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log

    r191379 r196079  
    2222/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-handlers-changed.html
    2323/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-omitted-capture.html
     24/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html
    2425/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html
    2526/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-reenter.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt

    r195355 r196079  
    88PASS Historical DOM features must be removed: DOMLocator
    99PASS Historical DOM features must be removed: DOMObject
     10FAIL Historical DOM features must be removed: DOMSettableTokenList assert_equals: expected (undefined) undefined but got (object) object "[object DOMSettableTokenListConstructor]"
    1011PASS Historical DOM features must be removed: DOMUserData
    1112PASS Historical DOM features must be removed: Entity
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html

    r191379 r196079  
    1919  "DOMLocator",
    2020  "DOMObject",
     21  "DOMSettableTokenList",
    2122  "DOMUserData",
    2223  "Entity",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt

    r189660 r196079  
    2020PASS Should be able to delete NodeList.
    2121PASS Should be able to delete HTMLCollection.
    22 PASS Should be able to delete DOMStringList.
    2322PASS Should be able to delete DOMTokenList.
    24 PASS Should be able to delete DOMSettableTokenList.
    2523
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html

    r189471 r196079  
    3232  "NodeList",
    3333  "HTMLCollection",
    34   "DOMStringList",
    35   "DOMTokenList",
    36   "DOMSettableTokenList"
     34  "DOMTokenList"
    3735];
    3836test(function() {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt

    r196001 r196079  
    708708PASS Element interface: attribute id
    709709PASS Element interface: attribute className
    710 PASS Element interface: attribute classList
     710FAIL Element interface: attribute classList assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined"
    711711PASS Element interface: operation hasAttributes()
    712712PASS Element interface: attribute attributes
     
    15581558PASS DOMTokenList interface: operation remove(DOMString)
    15591559PASS DOMTokenList interface: operation toggle(DOMString,boolean)
     1560FAIL DOMTokenList interface: operation replace(DOMString,DOMString) assert_own_property: interface prototype object missing non-static operation expected property "replace" missing
     1561FAIL DOMTokenList interface: operation supports(DOMString) assert_own_property: interface prototype object missing non-static operation expected property "supports" missing
     1562FAIL DOMTokenList interface: attribute value assert_true: The prototype object must have a property "value" expected true got false
    15601563FAIL DOMTokenList interface: stringifier assert_true: property is not enumerable expected true got false
    15611564PASS DOMTokenList must be primary interface of document.body.classList
     
    15721575PASS DOMTokenList interface: document.body.classList must inherit property "toggle" with the proper type (5)
    15731576PASS DOMTokenList interface: calling toggle(DOMString,boolean) on document.body.classList with too few arguments must throw TypeError
    1574 FAIL DOMSettableTokenList interface: existence and properties of interface object assert_equals: class string of DOMSettableTokenList expected "[object Function]" but got "[object DOMSettableTokenListConstructor]"
    1575 PASS DOMSettableTokenList interface object length
    1576 PASS DOMSettableTokenList interface object name
    1577 PASS DOMSettableTokenList interface: existence and properties of interface prototype object
    1578 PASS DOMSettableTokenList interface: existence and properties of interface prototype object's "constructor" property
    1579 PASS DOMSettableTokenList interface: attribute value
     1577FAIL DOMTokenList interface: document.body.classList must inherit property "replace" with the proper type (6) assert_inherits: property "replace" not found in prototype chain
     1578FAIL DOMTokenList interface: calling replace(DOMString,DOMString) on document.body.classList with too few arguments must throw TypeError assert_inherits: property "replace" not found in prototype chain
     1579FAIL DOMTokenList interface: document.body.classList must inherit property "supports" with the proper type (7) assert_inherits: property "supports" not found in prototype chain
     1580FAIL DOMTokenList interface: calling supports(DOMString) on document.body.classList with too few arguments must throw TypeError assert_inherits: property "supports" not found in prototype chain
     1581FAIL DOMTokenList interface: document.body.classList must inherit property "value" with the proper type (8) assert_inherits: property "value" not found in prototype chain
    15801582
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces.html

    r191379 r196079  
    284284           attribute DOMString id;
    285285           attribute DOMString className;
    286   [SameObject] readonly attribute DOMTokenList classList;
     286  [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
    287287
    288288  boolean hasAttributes();
     
    461461  void remove(DOMString... tokens);
    462462  boolean toggle(DOMString token, optional boolean force);
     463  void replace(DOMString token, DOMString newToken);
     464  boolean supports(DOMString token);
     465           attribute DOMString value;
    463466  stringifier;
    464467//  iterable<DOMString>;
    465 };
    466 
    467 interface DOMSettableTokenList : DOMTokenList {
    468             attribute DOMString value;
    469468};
    470469</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt

    r195497 r196079  
    338338PASS createDocument test 178: metadata for "foo","bar",DocumentType node
    339339PASS createDocument test 178: characterSet aliases for "foo","bar",DocumentType node
     340FAIL createDocument with missing arguments assert_throws: createDocument() should throw function "function () {
     341    document.implementation.createDocument(..." did not throw
    340342
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument.html

    r191379 r196079  
    121121  })
    122122})
     123
     124test(function() {
     125  assert_throws(new TypeError(), function() {
     126    document.implementation.createDocument()
     127  }, "createDocument() should throw")
     128
     129  assert_throws(new TypeError(), function() {
     130    document.implementation.createDocument('')
     131  }, "createDocument('') should throw")
     132}, "createDocument with missing arguments");
    123133</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist-expected.txt

    r194580 r196079  
    6363PASS classList.add should treat \f as a space
    6464PASS classList.length must be read-only
    65 PASS classList must be read-only
     65FAIL classList must have [PutForwards=value] assert_equals: expected 2 but got 1
    6666
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist.html

    r194580 r196079  
    291291}, 'classList.length must be read-only');
    292292test(function () {
    293   var failed = false, realList = secondelem.classList;
    294   try {
    295     secondelem.classList = '';
    296   } catch(e) {
    297     failed = e;
    298   }
     293  var realList = secondelem.classList;
     294  secondelem.classList = 'foo bar';
    299295  assert_equals(secondelem.classList,realList);
    300   assert_false(failed,'an error was thrown');
    301 }, 'classList must be read-only');
     296  assert_equals(secondelem.classList.length,2);
     297  assert_equals(secondelem.classList[0],'foo');
     298  assert_equals(secondelem.classList[1],'bar');
     299}, 'classList must have [PutForwards=value]');
    302300    </script>
    303301  </head>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt

    r194580 r196079  
    1  
    21
    3 PASS Node.isEqualNode
    4 PASS Node.isEqualNode 1
    5 PASS Node.isEqualNode 2
    6 PASS Node.isEqualNode 3
    7 PASS Node.isEqualNode 4
    8 PASS Node.isEqualNode 5
    9 PASS Node.isEqualNode 6
    10 PASS isEqualNode should return true when the attributes are in a different order
    11 PASS isEqualNode should return true if elements have same namespace, prefix, and local name
    12 PASS isEqualNode should return false if elements have different namespace
    13 PASS isEqualNode should return false if elements have different prefix
    14 PASS isEqualNode should return false if elements have different local name
    15 PASS isEqualNode should return true when the attributes have different prefixes
    16 PASS isEqualNode should return true when only the internal subsets of DocumentTypes differ.
     2PASS doctypes should be compared on name, public ID, and system ID
     3PASS elements should be compared on namespace, namespace prefix, local name, and number of attributes
     4PASS elements should be compared on attribute namespace, local name, and value
     5PASS processing instructions should be compared on target and data
     6PASS text nodes should be compared on data
     7PASS comments should be compared on data
     8PASS document fragments should not be compared based on properties
     9FAIL documents should not be compared based on properties assert_true: default HTML documents, created different ways expected true got false
     10PASS node equality testing should test descendant equality too
    1711
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes-expected.txt

    r194580 r196079  
    11
    2 FAIL AttrExodus assert_false: expected false got true
     2FAIL AttrExodus assert_false: should not be a Node expected false got true
    33PASS When qualifiedName does not match the Name production, an INVALID_CHARACTER_ERR exception is to be thrown. (setAttribute)
    44PASS setAttribute should lowercase its name argument (upper case attribute)
     
    4040PASS Basic functionality of setAttributeNode
    4141PASS Basic functionality of setAttributeNodeNS
     42FAIL If attr’s element is neither null nor element, throw an InUseAttributeError. Test bug: unrecognized DOMException code "INUSE_ATTRIBUTE_ERR" passed to assert_throws()
     43PASS Replacing an attr by itself
    4244PASS Basic functionality of removeAttributeNode
    4345FAIL setAttributeNode on bound attribute should throw InUseAttributeError Test bug: unrecognized DOMException code "INUSE_ATTRIBUTE_ERR" passed to assert_throws()
     46PASS setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute
     47PASS setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute (outer shell)
     48PASS setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order
    4449FAIL getAttributeNames tests el.getAttributeNames is not a function. (In 'el.getAttributeNames()', 'el.getAttributeNames' is undefined)
    4550FAIL Own property correctness with basic attributes assert_array_equals: lengths differ, expected 2 got 3
     
    4752FAIL Own property correctness with namespaced attribute before same-name non-namespaced one assert_array_equals: lengths differ, expected 3 got 4
    4853FAIL Own property correctness with two namespaced attributes with the same name-with-prefix assert_array_equals: lengths differ, expected 3 got 4
     54FAIL Own property names should only include all-lowercase qualified names for an HTML element in an HTML document assert_array_equals: lengths differ, expected 8 got 7
     55FAIL Own property names should include all qualified names for a non-HTML element in an HTML document assert_array_equals: lengths differ, expected 12 got 7
     56FAIL Own property names should include all qualified names for an HTML element in a non-HTML document assert_array_equals: lengths differ, expected 12 got 7
    4957
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes.html

    r194580 r196079  
    2020  document.body.setAttribute("abc", "pass")
    2121  var attr = document.body.attributes[0]
    22   assert_true(attr instanceof Attr)
    23   assert_false(attr instanceof Node)
    24   assert_throws(new TypeError(), function() { attr.appendChild(document.createTextNode("fail")) })
    25   assert_throws(new TypeError(), function() { attr.appendChild(null) })
     22  assert_true(attr instanceof Attr, "should be an Attr")
     23  assert_false(attr instanceof Node, "should not be a Node")
     24  var removed_members = [
     25    "appendChild",
     26    "insertBefore",
     27    "childNodes",
     28  ]
     29  removed_members.forEach(function(m) {
     30    assert_false(m in attr, m + " should not be supported")
     31  })
    2632  assert_equals(attr.value, "pass")
    27   assert_false("childNodes" in attr, "Should not have childNodes")
    2833}, "AttrExodus")
    2934
     
    443448
    444449test(function() {
     450  var el = document.createElement("div");
     451  var other = document.createElement("div");
     452  attr = document.createAttribute("foo");
     453  assert_equals(el.setAttributeNode(attr), null);
     454  assert_equals(attr.ownerElement, el);
     455  assert_throws("INUSE_ATTRIBUTE_ERR",
     456                  function() { other.setAttributeNode(attr) },
     457                  "Attribute already associated with el")
     458}, "If attr’s element is neither null nor element, throw an InUseAttributeError.");
     459
     460test(function() {
     461  var el = document.createElement("div");
     462  attr = document.createAttribute("foo");
     463  assert_equals(el.setAttributeNode(attr), null);
     464  el.setAttribute("bar", "qux");
     465  assert_equals(el.setAttributeNode(attr), attr);
     466  assert_equals(el.attributes[0], attr);
     467}, "Replacing an attr by itself");
     468
     469test(function() {
    445470  var el = document.createElement("div")
    446471  el.setAttribute("foo", "bar")
     
    460485  assert_throws("INUSE_ATTRIBUTE_ERR", function(){el2.setAttributeNode(attrNode)});
    461486}, "setAttributeNode on bound attribute should throw InUseAttributeError")
     487
     488// Have to use an async_test to see what a DOMAttrModified listener sees,
     489// because otherwise the event dispatch code will swallow our exceptions.  And
     490// we want to make sure this test always happens, even when no mutation events
     491// run.
     492var setAttributeNode_mutation_test = async_test("setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute");
     493
     494test(function(){
     495  var el = document.createElement("div")
     496  var attrNode1 = document.createAttribute("foo");
     497  attrNode1.value = "bar";
     498  el.setAttributeNode(attrNode1);
     499  var attrNode2 = document.createAttribute("foo");
     500  attrNode2.value = "baz";
     501
     502  el.addEventListener("DOMAttrModified", function(e) {
     503    // If this never gets called, that's OK, I guess.  But if it gets called, it
     504    // better represent a single modification with attrNode2 as the relatedNode.
     505    // We have to do an inner test() call here, because otherwise the exceptions
     506    // our asserts trigger will get swallowed by the event dispatch code.
     507    setAttributeNode_mutation_test.step(function() {
     508      assert_equals(e.attrName, "foo");
     509      assert_equals(e.attrChange, MutationEvent.MODIFICATION);
     510      assert_equals(e.prevValue, "bar");
     511      assert_equals(e.newValue, "baz");
     512      assert_equals(e.relatedNode, attrNode2);
     513    });
     514  });
     515
     516  var oldNode = el.setAttributeNode(attrNode2);
     517  assert_equals(oldNode, attrNode1,
     518                "Must return the old attr node from a setAttributeNode call");
     519}, "setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute (outer shell)");
     520setAttributeNode_mutation_test.done();
     521
     522test(function(){
     523  var el = document.createElement("div")
     524  el.setAttribute("a", "b");
     525  el.setAttribute("c", "d");
     526
     527  assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.name }),
     528                      ["a", "c"]);
     529  assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.value }),
     530                      ["b", "d"]);
     531
     532  var attrNode = document.createAttribute("a");
     533  attrNode.value = "e";
     534  el.setAttributeNode(attrNode);
     535
     536  assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.name }),
     537                      ["a", "c"]);
     538  assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.value }),
     539                      ["e", "d"]);
     540}, "setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order");
    462541
    463542test(function() {
     
    533612  assert_array_equals(Object.getOwnPropertyNames(el.attributes),
    534613                      ["0", "1", "2", "a", "b"])
     614  for (var propName of Object.getOwnPropertyNames(el.attributes)) {
     615    assert_true(el.attributes[propName] instanceof Attr,
     616                "el.attributes has an Attr for property name " + propName);
     617  }
    535618}, "Own property correctness with non-namespaced attribute before same-name namespaced one");
    536619
     
    546629  assert_array_equals(Object.getOwnPropertyNames(el.attributes),
    547630                      ["0", "1", "2", "a", "b"])
     631  for (var propName of Object.getOwnPropertyNames(el.attributes)) {
     632    assert_true(el.attributes[propName] instanceof Attr,
     633                "el.attributes has an Attr for property name " + propName);
     634  }
    548635}, "Own property correctness with namespaced attribute before same-name non-namespaced one");
    549636
     
    559646  assert_array_equals(Object.getOwnPropertyNames(el.attributes),
    560647                      ["0", "1", "2", "a:b", "c:d"])
     648  for (var propName of Object.getOwnPropertyNames(el.attributes)) {
     649    assert_true(el.attributes[propName] instanceof Attr,
     650                "el.attributes has an Attr for property name " + propName);
     651  }
    561652}, "Own property correctness with two namespaced attributes with the same name-with-prefix");
     653
     654test(function() {
     655  var el = document.createElement("div");
     656  el.setAttributeNS("foo", "A:B", "");
     657  el.setAttributeNS("bar", "c:D", "");
     658  el.setAttributeNS("baz", "e:F", "");
     659  el.setAttributeNS("qux", "g:h", "");
     660  el.setAttributeNS("", "I", "");
     661  el.setAttributeNS("", "j", "");
     662  assert_array_equals(Object.getOwnPropertyNames(el.attributes),
     663                      ["0", "1", "2", "3", "4", "5", "g:h", "j"])
     664  for (var propName of Object.getOwnPropertyNames(el.attributes)) {
     665    assert_true(el.attributes[propName] instanceof Attr,
     666                "el.attributes has an Attr for property name " + propName);
     667  }
     668}, "Own property names should only include all-lowercase qualified names for an HTML element in an HTML document");
     669
     670test(function() {
     671  var el = document.createElementNS("", "div");
     672  el.setAttributeNS("foo", "A:B", "");
     673  el.setAttributeNS("bar", "c:D", "");
     674  el.setAttributeNS("baz", "e:F", "");
     675  el.setAttributeNS("qux", "g:h", "");
     676  el.setAttributeNS("", "I", "");
     677  el.setAttributeNS("", "j", "");
     678  assert_array_equals(Object.getOwnPropertyNames(el.attributes),
     679                      ["0", "1", "2", "3", "4", "5", "A:B", "c:D", "e:F", "g:h", "I", "j"])
     680  for (var propName of Object.getOwnPropertyNames(el.attributes)) {
     681    assert_true(el.attributes[propName] instanceof Attr,
     682                "el.attributes has an Attr for property name " + propName);
     683  }
     684}, "Own property names should include all qualified names for a non-HTML element in an HTML document");
     685
     686test(function() {
     687  var doc = document.implementation.createDocument(null, "");
     688  assert_equals(doc.contentType, "application/xml");
     689  var el = doc.createElementNS("http://www.w3.org/1999/xhtml", "div");
     690  el.setAttributeNS("foo", "A:B", "");
     691  el.setAttributeNS("bar", "c:D", "");
     692  el.setAttributeNS("baz", "e:F", "");
     693  el.setAttributeNS("qux", "g:h", "");
     694  el.setAttributeNS("", "I", "");
     695  el.setAttributeNS("", "j", "");
     696  assert_array_equals(Object.getOwnPropertyNames(el.attributes),
     697                      ["0", "1", "2", "3", "4", "5", "A:B", "c:D", "e:F", "g:h", "I", "j"])
     698  for (var propName of Object.getOwnPropertyNames(el.attributes)) {
     699    assert_true(el.attributes[propName] instanceof Attr,
     700                "el.attributes has an Attr for property name " + propName);
     701  }
     702}, "Own property names should include all qualified names for an HTML element in a non-HTML document");
    562703</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log

    r194580 r196079  
    115115/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-constants.html
    116116/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains.html
     117/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains.xml
    117118/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-insertBefore.html
    118119/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-iframe1.xml
    119120/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-iframe2.xml
     121/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.html
    120122/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml
    121123/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-lookupNamespaceURI.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/w3c-import.log

    r191379 r196079  
    2525/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-comparePoint-2.html
    2626/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-comparePoint.html
     27/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor.html
    2728/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-deleteContents.html
    2829/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-detach.html
Note: See TracChangeset for help on using the changeset viewer.