Bug 910121 - Update web-platform-test tests.
authorMs2ger <ms2ger@gmail.com>
Sun, 20 Oct 2013 09:25:20 +0200
changeset 165240 182b8450e32fbfa4b238aef6ca01939e86a10904
parent 165239 b443665abc830e71b9cb2ad3118e44d7f423d8f8
child 165278 0d316980f21f45f47daae605bf632348ad521136
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs910121
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 910121 - Update web-platform-test tests.
dom/imptests/failures/html/dom/lists/Makefile.in
dom/imptests/failures/html/dom/lists/moz.build
dom/imptests/failures/html/dom/lists/test_DOMTokenList-stringifier.html.json
dom/imptests/failures/html/dom/test_interfaces.html.json
dom/imptests/failures/html/html/dom/documents/dta/Makefile.in
dom/imptests/failures/html/html/dom/documents/dta/test_document.images.html.json
dom/imptests/failures/html/microdata/microdata-dom-api/test_001.html.json
dom/imptests/html.mozbuild
dom/imptests/html/dom/lists/Makefile.in
dom/imptests/html/dom/lists/moz.build
dom/imptests/html/dom/lists/test_DOMTokenList-stringifier.html
dom/imptests/html/dom/nodes/test_DOMImplementation-createHTMLDocument.html
dom/imptests/html/dom/nodes/test_attributes.html
dom/imptests/html/dom/test_interfaces.html
dom/imptests/html/html/dom/documents/dta/Makefile.in
dom/imptests/html/html/dom/documents/dta/test_document.images.html
dom/imptests/html/html/dom/documents/dta/test_document.title-07.html
dom/imptests/html/microdata/microdata-dom-api/test_001.html
dom/imptests/moz.build
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/lists/Makefile.in
@@ -0,0 +1,5 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_DOMTokenList-stringifier.html.json \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/lists/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+DIRS += [
+]
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/lists/test_DOMTokenList-stringifier.html.json
@@ -0,0 +1,3 @@
+{
+  "DOMTokenList stringifier": true
+}
--- a/dom/imptests/failures/html/dom/test_interfaces.html.json
+++ b/dom/imptests/failures/html/dom/test_interfaces.html.json
@@ -1,30 +1,25 @@
 {
   "DOMException exception: existence and properties of exception interface prototype object": true,
   "DOMException exception: existence and properties of exception interface prototype object's \"name\" property": true,
-  "Event interface: document.createEvent(\"Event\") must inherit property \"timeStamp\" with the proper type (15)": true,
-  "Event interface: new Event(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": true,
   "CustomEvent interface: existence and properties of interface object": true,
-  "Event interface: new CustomEvent(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": true,
   "EventListener interface: existence and properties of interface prototype object": true,
   "EventListener interface: existence and properties of interface prototype object's \"constructor\" property": true,
   "EventListener interface: operation handleEvent(Event)": true,
   "MutationObserver interface: operation observe(Node,MutationObserverInit)": true,
   "Node interface: existence and properties of interface object": true,
   "Document interface: existence and properties of interface object": true,
   "Document interface: operation prepend([object Object],[object Object])": true,
   "Document interface: operation append([object Object],[object Object])": true,
   "XMLDocument interface: existence and properties of interface object": true,
   "Document interface: xmlDoc must inherit property \"prepend\" with the proper type (28)": true,
   "Document interface: calling prepend([object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError": true,
   "Document interface: xmlDoc must inherit property \"append\" with the proper type (29)": true,
   "Document interface: calling append([object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError": true,
-  "DOMImplementation interface: operation createDocument(DOMString,DOMString,DocumentType)": true,
-  "DOMImplementation interface: calling createDocument(DOMString,DOMString,DocumentType) on document.implementation with too few arguments must throw TypeError": true,
   "DocumentFragment interface: existence and properties of interface object": true,
   "DocumentFragment interface: operation prepend([object Object],[object Object])": true,
   "DocumentFragment interface: operation append([object Object],[object Object])": true,
   "DocumentFragment interface: document.createDocumentFragment() must inherit property \"prepend\" with the proper type (4)": true,
   "DocumentFragment interface: calling prepend([object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError": true,
   "DocumentFragment interface: document.createDocumentFragment() must inherit property \"append\" with the proper type (5)": true,
   "DocumentFragment interface: calling append([object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError": true,
   "DocumentType interface: existence and properties of interface object": true,
--- a/dom/imptests/failures/html/html/dom/documents/dta/Makefile.in
+++ b/dom/imptests/failures/html/html/dom/documents/dta/Makefile.in
@@ -1,11 +1,12 @@
 # THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
 
 MOCHITEST_FILES := \
+  test_document.images.html.json \
   test_document.title-03.html.json \
   test_document.title-04.xhtml.json \
   test_document.title-06.html.json \
   test_document.title-07.html.json \
   test_nameditem-02.html.json \
   test_nameditem-03.html.json \
   test_nameditem-04.html.json \
   test_nameditem-05.html.json \
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/html/dom/documents/dta/test_document.images.html.json
@@ -0,0 +1,3 @@
+{
+  "The empty string should not be in the collections": true
+}
--- a/dom/imptests/failures/html/microdata/microdata-dom-api/test_001.html.json
+++ b/dom/imptests/failures/html/microdata/microdata-dom-api/test_001.html.json
@@ -1,3 +1,23 @@
 {
+  "itemType.remove must remove all useless whitespace": true,
+  "itemType.remove must collapse multiple whitespace around removed tokens": true,
+  "itemType.remove must remove duplicates when removing tokens": true,
+  "itemType.add must remove unused whitespace when the token already exists": true,
+  "itemType.add should normalize \\t as a space": true,
+  "itemType.add should normalize \\r as a space": true,
+  "itemType.add should normalize \\n as a space": true,
+  "itemType.add should normalize \\f as a space": true,
+  "itemProp.remove must remove all useless whitespace": true,
+  "itemProp.add must remove useless whitespace and duplicates when the token already exists": true,
+  "itemProp.add should normalize \\t as a space": true,
+  "itemProp.add should normalize \\r as a space": true,
+  "itemProp.add should normalize \\n as a space": true,
+  "itemProp.add should normalize \\f as a space": true,
+  "itemRef.remove must remove useless whitespace when removing tokens": true,
+  "itemRef.add must remove whitespace and duplicate when the token already exists": true,
+  "itemRef.add should normalize \\t as a space": true,
+  "itemRef.add should normalize \\r as a space": true,
+  "itemRef.add should normalize \\n as a space": true,
+  "itemRef.add should normalize \\f as a space": true,
   "itemValue must reflect the src attribute on track elements": true
 }
--- a/dom/imptests/html.mozbuild
+++ b/dom/imptests/html.mozbuild
@@ -1,15 +1,16 @@
 # THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
 
 DIRS += [
     'html/dom',
     'html/dom/collections',
     'html/dom/errors',
     'html/dom/events',
+    'html/dom/lists',
     'html/dom/nodes',
     'html/dom/nodes/Document-createElement-namespace-tests',
     'html/dom/ranges',
     'html/dom/traversal',
     'html/dom/traversal/unfinished',
     'html/domxpath',
     'html/html/browsers/browsing-the-web/read-media',
     'html/html/browsers/the-window-object',
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/lists/Makefile.in
@@ -0,0 +1,5 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_DOMTokenList-stringifier.html \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/lists/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/lists/test_DOMTokenList-stringifier.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>DOMTokenList stringifier</title>
+<link rel=help href="http://dom.spec.whatwg.org/#dom-domtokenlist-stringifier">
+<link rel=author title=Ms2ger href="mailto:Ms2ger@gmail.com">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id=log></div>
+<span class="   a  a b"></span>
+<script>
+test(function() {
+  var span = document.querySelector("span");
+  assert_equals(span.getAttribute("class"), "   a  a b",
+                "getAttribute should return the literal value");
+  assert_equals(span.className, "   a  a b",
+                "className should return the literal value");
+  assert_equals(String(span.classList), "a b",
+                "String(classList) should compress whitespace");
+  assert_equals(span.classList.toString(), "a b",
+                "classList.toString() should compress whitespace");
+  assert_class_string(span.classList, "DOMTokenList");
+});
+</script>
--- a/dom/imptests/html/dom/nodes/test_DOMImplementation-createHTMLDocument.html
+++ b/dom/imptests/html/dom/nodes/test_DOMImplementation-createHTMLDocument.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 <meta charset=utf-8>
 <title>DOMImplementation.createHTMLDocument</title>
-<link rel=help href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domimplementation-createhtmldocument">
-<link rel=help href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-documenttype-name">
-<link rel=help href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-documenttype-publicid">
-<link rel=help href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-documenttype-systemid">
-<link rel=help href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-document-documentelement">
+<link rel=help href="http://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument">
+<link rel=help href="http://dom.spec.whatwg.org/#dom-documenttype-name">
+<link rel=help href="http://dom.spec.whatwg.org/#dom-documenttype-publicid">
+<link rel=help href="http://dom.spec.whatwg.org/#dom-documenttype-systemid">
+<link rel=help href="http://dom.spec.whatwg.org/#dom-document-documentelement">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 function checkDoc(title, expectedtitle, normalizedtitle) {
   test(function() {
     var doc = document.implementation.createHTMLDocument(title);
     assert_equals(doc.doctype.name, "html")
--- a/dom/imptests/html/dom/nodes/test_attributes.html
+++ b/dom/imptests/html/dom/nodes/test_attributes.html
@@ -19,17 +19,18 @@ var XMLNS = "http://www.w3.org/2000/xmln
 test(function() {
   document.body.setAttribute("abc", "pass")
   var attr = document.body.attributes[0]
   assert_true(attr instanceof Attr)
   assert_false(attr instanceof Node)
   assert_throws(new TypeError(), function() { attr.appendChild(document.createTextNode("fail")) })
   assert_throws(new TypeError(), function() { attr.appendChild(null) })
   assert_equals(attr.value, "pass")
-  assert_false("childNodes" in attr)
+  assert_false("childNodes" in attr, "Should not have childNodes")
+  assert_false("textContent" in attr, "Should not have textContent")
 }, "AttrExodus")
 
 // setAttribute exhaustive tests
 // Step 1
 test(function() {
   var el = document.createElement("foo")
   for (var i = 0; i < invalid_names.length; i++) {
     assert_throws("INVALID_CHARACTER_ERR", function() { el.setAttribute(invalid_names[i], "test") })
--- a/dom/imptests/html/dom/test_interfaces.html
+++ b/dom/imptests/html/dom/test_interfaces.html
@@ -56,17 +56,17 @@ interface Event {
   void stopImmediatePropagation();
 
   readonly attribute boolean bubbles;
   readonly attribute boolean cancelable;
   void preventDefault();
   readonly attribute boolean defaultPrevented;
 
   [Unforgeable] readonly attribute boolean isTrusted;
-  readonly attribute DOMTimeStamp timeStamp;
+  readonly attribute /* DOMTimeStamp */ unsigned long long timeStamp;
 
   void initEvent(DOMString type, boolean bubbles, boolean cancelable);
 };
 
 dictionary EventInit {
   boolean bubbles = false;
   boolean cancelable = false;
 };
@@ -240,17 +240,17 @@ interface Document : Node {
   NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow, optional NodeFilter? filter);
   TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow, optional NodeFilter? filter);
 };
 
 interface XMLDocument : Document {};
 
 interface DOMImplementation {
   DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
-  XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, DocumentType? doctype);
+  XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
   Document createHTMLDocument(optional DOMString title);
 
   boolean hasFeature(DOMString feature, [TreatNullAs=EmptyString] DOMString version);
 };
 
 [Constructor]
 interface DocumentFragment : Node {
 };
--- a/dom/imptests/html/html/dom/documents/dta/Makefile.in
+++ b/dom/imptests/html/html/dom/documents/dta/Makefile.in
@@ -3,16 +3,17 @@
 MOCHITEST_FILES := \
   test_document.body-getter.html \
   test_document.body-setter-01.html \
   test_document.embeds-document.plugins-01.html \
   test_Document.getElementsByClassName-null-undef.html \
   test_document.getElementsByClassName-same.html \
   test_document.head-01.html \
   test_document.head-02.html \
+  test_document.images.html \
   test_document.title-01.html \
   test_document.title-02.xhtml \
   test_document.title-03.html \
   test_document.title-04.xhtml \
   test_document.title-05.html \
   test_document.title-06.html \
   test_document.title-07.html \
   test_Element.getElementsByClassName-null-undef.html \
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/html/dom/documents/dta/test_document.images.html
@@ -0,0 +1,105 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Document.images</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id=log></div>
+<div id=test>
+<img>
+<img id=x><img name=y><img id=z1 name=z2>
+<img id=a><img id=a>
+<img name=b><img name=b>
+<img id=><img name=>
+<input type=image name=input>
+</div>
+<script>
+function assert_all(aAssertFunc, aCollection) {
+  for (var i = 0; i < aCollection.length; ++i) {
+    aAssertFunc(aCollection[i]);
+  }
+}
+
+var XHTML = "http://www.w3.org/1999/xhtml";
+var div, images, c;
+
+setup(function() {
+  div = document.getElementById("test");
+  var foreign =
+    div.appendChild(document.createElementNS("http://example.org", "img"));
+  foreign.setAttribute("id", "f");
+
+  images = [].slice.call(div.getElementsByTagNameNS(XHTML, "img"));
+
+  c = document.images;
+});
+
+test(function() {
+  assert_equals(c.length, 10);
+  assert_array_equals(c, images);
+
+  assert_all(function (aElement) {
+    assert_equals(aElement.namespaceURI, XHTML);
+  }, c);
+}, "document.images should contain all HTML img elements");
+
+test(function() {
+  assert_equals(c.x, images[1]);
+  assert_equals(c.namedItem("x"), images[1]);
+  assert_true("x" in c, '"x" in c');
+}, "img with id");
+
+test(function() {
+  assert_equals(c.y, images[2]);
+  assert_equals(c.namedItem("y"), images[2]);
+  assert_true("y" in c, '"y" in c');
+}, "img with name");
+
+test(function() {
+  assert_equals(c.z1, images[3]);
+  assert_equals(c.namedItem("z1"), images[3]);
+  assert_true("z1" in c, '"z1" in c');
+  assert_equals(c.z2, images[3]);
+  assert_equals(c.namedItem("z2"), images[3]);
+  assert_true("z2" in c, '"z2" in c');
+}, "img with id and name");
+
+test(function() {
+  assert_equals(c.a, images[4]);
+  assert_equals(c.namedItem("a"), images[4]);
+  assert_true("a" in c, '"a" in c');
+}, "Two img elements with the same id");
+
+test(function() {
+  assert_equals(c.b, images[6]);
+  assert_equals(c.namedItem("b"), images[6]);
+  assert_true("b" in c, '"b" in c');
+}, "Two img elements with the same name");
+
+test(function() {
+  assert_equals(c.c, undefined);
+  assert_equals(c.namedItem("c"), null);
+  assert_false("c" in c, '"c" in c');
+}, "Unknown name should not be in the collection");
+
+test(function() {
+  assert_equals(c.f, undefined);
+  assert_equals(c.namedItem("f"), null);
+  assert_false("f" in c, '"f" in c');
+}, "Foreign element should not be in the collection");
+
+test(function() {
+  assert_equals(c.input, undefined);
+  assert_equals(c.namedItem("input"), null);
+  assert_false("input" in c, '"input" in c');
+  var input = div.getElementsByTagName("input")[0];
+  assert_all(function (aElement) {
+    assert_not_equals(aElement.namespaceURI, input);
+  }, c);
+}, "Input elements should not be in the collection");
+
+test(function() {
+  assert_equals(c[""], undefined);
+  assert_equals(c.namedItem(""), null);
+  assert_false("" in c, '"" in c');
+}, "The empty string should not be in the collections");
+</script>
--- a/dom/imptests/html/html/dom/documents/dta/test_document.title-07.html
+++ b/dom/imptests/html/html/dom/documents/dta/test_document.title-07.html
@@ -13,9 +13,14 @@ function checkDoc(title, expectedtitle, 
 checkDoc("", "", "")
 checkDoc(null, "null", "null")
 checkDoc(undefined, "undefined", "undefined")
 checkDoc("foo  bar baz", "foo  bar baz", "foo bar baz")
 checkDoc("foo\t\tbar baz", "foo\t\tbar baz", "foo bar baz")
 checkDoc("foo\n\nbar baz", "foo\n\nbar baz", "foo bar baz")
 checkDoc("foo\f\fbar baz", "foo\f\fbar baz", "foo bar baz")
 checkDoc("foo\r\rbar baz", "foo\r\rbar baz", "foo bar baz")
+
+test(function() {
+  var doc = document.implementation.createHTMLDocument()
+  assert_equals(doc.title, "")
+}, "Missing title argument");
 </script>
--- a/dom/imptests/html/microdata/microdata-dom-api/test_001.html
+++ b/dom/imptests/html/microdata/microdata-dom-api/test_001.html
@@ -382,33 +382,38 @@ test(function () {
 test(function () {
         var elem = makeEl('div',{itemtype:'token1 token2 token3'});
         elem.itemType.remove('token2');
         assert_equals( elem.itemType.toString(), 'token1 token3' );
 }, 'itemType.remove must collapse whitespace around removed tokens');
 test(function () {
         var elem = makeEl('div',{itemtype:' token1 token2  '});
         elem.itemType.remove('token2');
-        assert_equals( elem.itemType.toString(), ' token1' );
-}, 'itemType.remove must only remove whitespace around removed tokens');
-test(function () {
-        var elem = makeEl('div',{itemtype:'  token1  token2  token1  '});
+        assert_equals( elem.itemType.toString(), 'token1' );
+}, 'itemType.remove must remove all useless whitespace');
+test(function () {
+        var elem = makeEl('div',{itemtype:'  token1  token2  token3  '});
         elem.itemType.remove('token2');
-        assert_equals( elem.itemType.toString(), '  token1 token1  ' );
+        assert_equals( elem.itemType.toString(), 'token1 token3' );
 }, 'itemType.remove must collapse multiple whitespace around removed tokens');
 test(function () {
         var elem = makeEl('div',{itemtype:'  token1  token2  token1  '});
-        elem.itemType.remove('token1');
+        elem.itemType.remove('token2');
+        assert_equals( elem.itemType.toString(), 'token1' );
+}, 'itemType.remove must remove duplicates when removing tokens');
+test(function () {
+        var elem = makeEl('div',{itemtype:'  token1  token2  token3  '});
+        elem.itemType.remove('token1', 'token3');
         assert_equals( elem.itemType.toString(), 'token2' );
 }, 'itemType.remove must collapse whitespace when removing multiple tokens');
 test(function () {
-        var elem = makeEl('div',{itemtype:'  token1  token1  '});
+        var elem = makeEl('div',{itemtype:'  token1  token2  '});
         elem.itemType.add('token1');
-        assert_equals( elem.itemType.toString(), '  token1  token1  ' );
-}, 'itemType.add must not affect whitespace when the token already exists');
+        assert_equals( elem.itemType.toString(), 'token1 token2' );
+}, 'itemType.add must remove unused whitespace when the token already exists');
 test(function () {
         var elem = makeEl('div',{itemtype:'FOO'});
         assert_true(elem.itemType.toggle('foo'));
         assert_equals( elem.itemType.length, 2 );
         assert_true( elem.itemType.contains('foo') );
         assert_true( elem.itemType.contains('FOO') );
 }, 'itemType.toggle must toggle tokens case-sensitively when adding');
 test(function () {
@@ -451,33 +456,33 @@ test(function () {
 test(function () {
         var elem = makeEl('div',{itemtype:'a '});
         elem.itemType.add('b');
         assert_equals(elem.itemType.toString(),'a b');
 }, 'itemType.add should treat " " as a space');
 test(function () {
         var elem = makeEl('div',{itemtype:'a\t'});
         elem.itemType.add('b');
-        assert_equals(elem.itemType.toString(),'a\tb');
-}, 'itemType.add should treat \\t as a space');
+        assert_equals(elem.itemType.toString(),'a b');
+}, 'itemType.add should normalize \\t as a space');
 test(function () {
         var elem = makeEl('div',{itemtype:'a\r'});
         elem.itemType.add('b');
-        assert_equals(elem.itemType.toString(),'a\rb');
-}, 'itemType.add should treat \\r as a space');
+        assert_equals(elem.itemType.toString(),'a b');
+}, 'itemType.add should normalize \\r as a space');
 test(function () {
         var elem = makeEl('div',{itemtype:'a\n'});
         elem.itemType.add('b');
-        assert_equals(elem.itemType.toString(),'a\nb');
-}, 'itemType.add should treat \\n as a space');
+        assert_equals(elem.itemType.toString(),'a b');
+}, 'itemType.add should normalize \\n as a space');
 test(function () {
         var elem = makeEl('div',{itemtype:'a\f'});
         elem.itemType.add('b');
-        assert_equals(elem.itemType.toString(),'a\fb');
-}, 'itemType.add should treat \\f as a space');
+        assert_equals(elem.itemType.toString(),'a b');
+}, 'itemType.add should normalize \\f as a space');
 test(function () {
         var elem = makeEl('div',{itemtype:'foo'});
         elem.itemType.remove('foo');
         elem.removeAttribute('itemtype');
         assert_true( elem.itemType.toggle('foo') );
 }, 'itemType.toggle must work after removing the itemtype attribute');
 test(function () {
         //WebIDL and ECMAScript 5 - a readonly property has a getter but not a setter
@@ -670,35 +675,30 @@ test(function () {
 	assert_false( elem.itemProp.contains('test') );
 }, 'itemProp.remove must remove duplicated tokens');
 test(function () {
 	var elem = makeEl('div',{itemprop:'token1 token2 token3'});
 	elem.itemProp.remove('token2');
 	assert_equals( elem.itemProp.toString(), 'token1 token3' );
 }, 'itemProp.remove must collapse whitespace around removed tokens');
 test(function () {
-	var elem = makeEl('div',{itemprop:' token1 token2  '});
-	elem.itemProp.remove('token2');
-	assert_equals( elem.itemProp.toString(), ' token1' );
-}, 'itemProp.remove must only remove whitespace around removed tokens');
-test(function () {
-	var elem = makeEl('div',{itemprop:'  token1  token2  token1  '});
+	var elem = makeEl('div',{itemprop:'  token1  token2  token3  '});
 	elem.itemProp.remove('token2');
-	assert_equals( elem.itemProp.toString(), '  token1 token1  ' );
-}, 'itemProp.remove must collapse multiple whitespace around removed tokens');
-test(function () {
-	var elem = makeEl('div',{itemprop:'  token1  token2  token1  '});
-	elem.itemProp.remove('token1');
+	assert_equals( elem.itemProp.toString(), 'token1 token3' );
+}, 'itemProp.remove must remove all useless whitespace');
+test(function () {
+	var elem = makeEl('div',{itemprop:'  token1  token2  token3  '});
+	elem.itemProp.remove('token1', 'token3');
 	assert_equals( elem.itemProp.toString(), 'token2' );
-}, 'itemProp.remove must collapse whitespace when removing multiple tokens');
+}, 'itemProp.remove must remove useless whitespace when removing multiple tokens');
 test(function () {
 	var elem = makeEl('div',{itemprop:'  token1  token1  '});
 	elem.itemProp.add('token1');
-	assert_equals( elem.itemProp.toString(), '  token1  token1  ' );
-}, 'itemProp.add must not affect whitespace when the token already exists');
+	assert_equals( elem.itemProp.toString(), 'token1' );
+}, 'itemProp.add must remove useless whitespace and duplicates when the token already exists');
 test(function () {
 	var elem = makeEl('div',{itemprop:'FOO'});
 	assert_true(elem.itemProp.toggle('foo'));
 	assert_equals( elem.itemProp.length, 2 );
 	assert_true( elem.itemProp.contains('foo') );
 	assert_true( elem.itemProp.contains('FOO') );
 }, 'itemProp.toggle must toggle tokens case-sensitively when adding');
 test(function () {
@@ -741,33 +741,33 @@ test(function () {
 test(function () {
 	var elem = makeEl('div',{itemprop:'a '});
 	elem.itemProp.add('b');
 	assert_equals(elem.itemProp.toString(),'a b');
 }, 'itemProp.add should treat " " as a space');
 test(function () {
 	var elem = makeEl('div',{itemprop:'a\t'});
 	elem.itemProp.add('b');
-	assert_equals(elem.itemProp.toString(),'a\tb');
-}, 'itemProp.add should treat \\t as a space');
+	assert_equals(elem.itemProp.toString(),'a b');
+}, 'itemProp.add should normalize \\t as a space');
 test(function () {
 	var elem = makeEl('div',{itemprop:'a\r'});
 	elem.itemProp.add('b');
-	assert_equals(elem.itemProp.toString(),'a\rb');
-}, 'itemProp.add should treat \\r as a space');
+	assert_equals(elem.itemProp.toString(),'a b');
+}, 'itemProp.add should normalize \\r as a space');
 test(function () {
 	var elem = makeEl('div',{itemprop:'a\n'});
 	elem.itemProp.add('b');
-	assert_equals(elem.itemProp.toString(),'a\nb');
-}, 'itemProp.add should treat \\n as a space');
+	assert_equals(elem.itemProp.toString(),'a b');
+}, 'itemProp.add should normalize \\n as a space');
 test(function () {
 	var elem = makeEl('div',{itemprop:'a\f'});
 	elem.itemProp.add('b');
-	assert_equals(elem.itemProp.toString(),'a\fb');
-}, 'itemProp.add should treat \\f as a space');
+	assert_equals(elem.itemProp.toString(),'a b');
+}, 'itemProp.add should normalize \\f as a space');
 test(function () {
 	var elem = makeEl('div',{itemprop:'foo'});
 	elem.itemProp.remove('foo');
 	elem.removeAttribute('itemprop');
 	assert_true( elem.itemProp.toggle('foo') );
 }, 'itemProp.toggle must work after removing the itemprop attribute');
 test(function () {
 	//WebIDL and ECMAScript 5 - a readonly property has a getter but not a setter
@@ -1004,33 +1004,33 @@ test(function () {
 test(function () {
 	var elem = makeEl('div',{itemref:'token1 token2 token3'});
 	elem.itemRef.remove('token2');
 	assert_equals( elem.itemRef.toString(), 'token1 token3' );
 }, 'itemRef.remove must collapse whitespace around removed tokens');
 test(function () {
 	var elem = makeEl('div',{itemref:' token1 token2  '});
 	elem.itemRef.remove('token2');
-	assert_equals( elem.itemRef.toString(), ' token1' );
-}, 'itemRef.remove must only remove whitespace around removed tokens');
-test(function () {
-	var elem = makeEl('div',{itemref:'  token1  token2  token1  '});
+	assert_equals( elem.itemRef.toString(), 'token1' );
+}, 'itemRef.remove must remove useless whitespace when removing tokens');
+test(function () {
+	var elem = makeEl('div',{itemref:'  token1  token2  token3  '});
 	elem.itemRef.remove('token2');
-	assert_equals( elem.itemRef.toString(), '  token1 token1  ' );
-}, 'itemRef.remove must collapse multiple whitespace around removed tokens');
-test(function () {
-	var elem = makeEl('div',{itemref:'  token1  token2  token1  '});
-	elem.itemRef.remove('token1');
+	assert_equals( elem.itemRef.toString(), 'token1 token3' );
+}, 'itemRef.remove must remove useless whitespace when removing tokens');
+test(function () {
+	var elem = makeEl('div',{itemref:'  token1  token2  token3  '});
+	elem.itemRef.remove('token1', 'token3');
 	assert_equals( elem.itemRef.toString(), 'token2' );
 }, 'itemRef.remove must collapse whitespace when removing multiple tokens');
 test(function () {
 	var elem = makeEl('div',{itemref:'  token1  token1  '});
 	elem.itemRef.add('token1');
-	assert_equals( elem.itemRef.toString(), '  token1  token1  ' );
-}, 'itemRef.add must not affect whitespace when the token already exists');
+	assert_equals( elem.itemRef.toString(), 'token1' );
+}, 'itemRef.add must remove whitespace and duplicate when the token already exists');
 test(function () {
 	var elem = makeEl('div',{itemref:'FOO'});
 	assert_true(elem.itemRef.toggle('foo'));
 	assert_equals( elem.itemRef.length, 2 );
 	assert_true( elem.itemRef.contains('foo') );
 	assert_true( elem.itemRef.contains('FOO') );
 }, 'itemRef.toggle must toggle tokens case-sensitively when adding');
 test(function () {
@@ -1073,33 +1073,33 @@ test(function () {
 test(function () {
 	var elem = makeEl('div',{itemref:'a '});
 	elem.itemRef.add('b');
 	assert_equals(elem.itemRef.toString(),'a b');
 }, 'itemRef.add should treat " " as a space');
 test(function () {
 	var elem = makeEl('div',{itemref:'a\t'});
 	elem.itemRef.add('b');
-	assert_equals(elem.itemRef.toString(),'a\tb');
-}, 'itemRef.add should treat \\t as a space');
+	assert_equals(elem.itemRef.toString(),'a b');
+}, 'itemRef.add should normalize \\t as a space');
 test(function () {
 	var elem = makeEl('div',{itemref:'a\r'});
 	elem.itemRef.add('b');
-	assert_equals(elem.itemRef.toString(),'a\rb');
-}, 'itemRef.add should treat \\r as a space');
+	assert_equals(elem.itemRef.toString(),'a b');
+}, 'itemRef.add should normalize \\r as a space');
 test(function () {
 	var elem = makeEl('div',{itemref:'a\n'});
 	elem.itemRef.add('b');
-	assert_equals(elem.itemRef.toString(),'a\nb');
-}, 'itemRef.add should treat \\n as a space');
+	assert_equals(elem.itemRef.toString(),'a b');
+}, 'itemRef.add should normalize \\n as a space');
 test(function () {
 	var elem = makeEl('div',{itemref:'a\f'});
 	elem.itemRef.add('b');
-	assert_equals(elem.itemRef.toString(),'a\fb');
-}, 'itemRef.add should treat \\f as a space');
+	assert_equals(elem.itemRef.toString(),'a b');
+}, 'itemRef.add should normalize \\f as a space');
 test(function () {
 	var elem = makeEl('div',{itemref:'foo'});
 	elem.itemRef.remove('foo');
 	elem.removeAttribute('itemref');
 	assert_true( elem.itemRef.toggle('foo') );
 }, 'itemRef.toggle must work after removing the itemref attribute');
 test(function () {
 	//WebIDL and ECMAScript 5 - a readonly property has a getter but not a setter
--- a/dom/imptests/moz.build
+++ b/dom/imptests/moz.build
@@ -5,16 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'failures/editing/conformancetest',
     'failures/editing/selecttest',
     'failures/html/dom',
     'failures/html/dom/collections',
     'failures/html/dom/errors',
+    'failures/html/dom/lists',
     'failures/html/dom/nodes',
     'failures/html/dom/ranges',
     'failures/html/html/browsers/the-window-object',
     'failures/html/html/browsers/the-window-object/named-access-on-the-window-object',
     'failures/html/html/dom/documents/dta',
     'failures/html/html/dom/documents/dta/doc.gEBN',
     'failures/html/html/obsolete/implreq/oeaaa',
     'failures/html/html/semantics/forms/the-form-element',