Bug 1217767 - Update web-platform-tests to revision 9a49a8ea7405280364a8aa27d47bfb19af119bb4, a=testonly
authorJames Graham <james@hoppipolla.co.uk>
Wed, 21 Oct 2015 13:47:57 +0100
changeset 304374 c050501bde8269be0183a5d394afe413565bdee5
parent 304373 9ece884a2db8ef6258b124d5ac6acd6c889045af
child 304375 f65121860ffe934518e7a886243e648db4289629
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1217767
milestone44.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 1217767 - Update web-platform-tests to revision 9a49a8ea7405280364a8aa27d47bfb19af119bb4, a=testonly
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/mozilla-sync
testing/web-platform/tests/dom/collections/storage-supported-property-names.html
testing/web-platform/tests/dom/nodes/Document-createElement-namespace.html
testing/web-platform/tests/dom/nodes/Node-lookupNamespaceURI.html
testing/web-platform/tests/dom/nodes/getElementsByClassName-10.xml
testing/web-platform/tests/dom/nodes/getElementsByClassName-11.xml
testing/web-platform/tests/dom/nodes/selectors.js
testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/unload/008.html
testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/unload/009.html
testing/web-platform/tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
testing/web-platform/tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
testing/web-platform/tests/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html
testing/web-platform/tests/html/rendering/non-replaced-elements/flow-content-0/div-align.html
testing/web-platform/tests/html/semantics/forms/the-option-element/option-text-recurse.html
testing/web-platform/tests/html/semantics/tabular-data/the-tbody-element/deleteRow.html
testing/web-platform/tests/html/semantics/tabular-data/the-tbody-element/insertRow.html
testing/web-platform/tests/lint.whitelist
testing/web-platform/tests/subresource-integrity/crossorigin-creds-script.js.sub.headers
testing/web-platform/tests/subresource-integrity/crossorigin-creds-style.css.sub.headers
testing/web-platform/tests/subresource-integrity/subresource-integrity.html
testing/web-platform/tests/subresource-integrity/subresource-integrity.sub.html
testing/web-platform/tests/tools/manifest/sourcefile.py
testing/web-platform/tests/webstorage/idlharness.html
testing/web-platform/tests/webstorage/storage_supported_property_names.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -13277,20 +13277,16 @@
         "path": "dom/collections/HTMLCollection-empty-name.html",
         "url": "/dom/collections/HTMLCollection-empty-name.html"
       },
       {
         "path": "dom/collections/HTMLCollection-supported-property-names.html",
         "url": "/dom/collections/HTMLCollection-supported-property-names.html"
       },
       {
-        "path": "dom/collections/storage-supported-property-names.html",
-        "url": "/dom/collections/storage-supported-property-names.html"
-      },
-      {
         "path": "dom/events/Event-constants.html",
         "url": "/dom/events/Event-constants.html"
       },
       {
         "path": "dom/events/Event-constructors.html",
         "url": "/dom/events/Event-constructors.html"
       },
       {
@@ -13705,16 +13701,20 @@
         "path": "dom/nodes/Element-firstElementChild.xhtml",
         "url": "/dom/nodes/Element-firstElementChild.xhtml"
       },
       {
         "path": "dom/nodes/Element-getElementsByClassName.html",
         "url": "/dom/nodes/Element-getElementsByClassName.html"
       },
       {
+        "path": "dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html",
+        "url": "/dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html"
+      },
+      {
         "path": "dom/nodes/Element-getElementsByTagName.html",
         "url": "/dom/nodes/Element-getElementsByTagName.html"
       },
       {
         "path": "dom/nodes/Element-getElementsByTagNameNS.html",
         "url": "/dom/nodes/Element-getElementsByTagNameNS.html"
       },
       {
@@ -13833,16 +13833,20 @@
         "path": "dom/nodes/Node-constants.html",
         "url": "/dom/nodes/Node-constants.html"
       },
       {
         "path": "dom/nodes/Node-contains.html",
         "url": "/dom/nodes/Node-contains.html"
       },
       {
+        "path": "dom/nodes/Node-contains.xml",
+        "url": "/dom/nodes/Node-contains.xml"
+      },
+      {
         "path": "dom/nodes/Node-insertBefore.html",
         "url": "/dom/nodes/Node-insertBefore.html"
       },
       {
         "path": "dom/nodes/Node-isEqualNode.xhtml",
         "url": "/dom/nodes/Node-isEqualNode.xhtml"
       },
       {
@@ -13969,16 +13973,24 @@
         "path": "dom/nodes/getElementsByClassName-08.htm",
         "url": "/dom/nodes/getElementsByClassName-08.htm"
       },
       {
         "path": "dom/nodes/getElementsByClassName-09.htm",
         "url": "/dom/nodes/getElementsByClassName-09.htm"
       },
       {
+        "path": "dom/nodes/getElementsByClassName-10.xml",
+        "url": "/dom/nodes/getElementsByClassName-10.xml"
+      },
+      {
+        "path": "dom/nodes/getElementsByClassName-11.xml",
+        "url": "/dom/nodes/getElementsByClassName-11.xml"
+      },
+      {
         "path": "dom/nodes/getElementsByClassName-12.htm",
         "url": "/dom/nodes/getElementsByClassName-12.htm"
       },
       {
         "path": "dom/nodes/getElementsByClassName-13.htm",
         "url": "/dom/nodes/getElementsByClassName-13.htm"
       },
       {
@@ -26129,20 +26141,16 @@
         "path": "shadow-dom/untriaged/user-interaction/ranges-and-selections/test-001.html",
         "url": "/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-001.html"
       },
       {
         "path": "shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html",
         "url": "/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html"
       },
       {
-        "path": "subresource-integrity/subresource-integrity.html",
-        "url": "/subresource-integrity/subresource-integrity.html"
-      },
-      {
         "path": "touch-events/create-touch-touchlist.html",
         "url": "/touch-events/create-touch-touchlist.html"
       },
       {
         "path": "typedarrays/ArrayBuffer_constructor.html",
         "url": "/typedarrays/ArrayBuffer_constructor.html"
       },
       {
@@ -27601,16 +27609,20 @@
         "path": "webstorage/storage_setitem.html",
         "url": "/webstorage/storage_setitem.html"
       },
       {
         "path": "webstorage/storage_string_conversion.html",
         "url": "/webstorage/storage_string_conversion.html"
       },
       {
+        "path": "webstorage/storage_supported_property_names.html",
+        "url": "/webstorage/storage_supported_property_names.html"
+      },
+      {
         "path": "webvtt/interfaces.html",
         "url": "/webvtt/interfaces.html"
       },
       {
         "path": "webvtt/webvtt-api-for-browsers/vttcue-interface/align.html",
         "url": "/webvtt/webvtt-api-for-browsers/vttcue-interface/align.html"
       },
       {
@@ -29777,26 +29789,17 @@
       },
       {
         "path": "webdriver/user_input/clear_test.py"
       }
     ]
   },
   "local_changes": {
     "deleted": [],
-    "items": {
-      "testharness": {
-        "dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html": [
-          {
-            "path": "dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html",
-            "url": "/dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html"
-          }
-        ]
-      }
-    },
+    "items": {},
     "reftest_nodes": {}
   },
   "reftest_nodes": {
     "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm": [
       {
         "path": "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm",
         "references": [
           [
@@ -31518,16 +31521,28 @@
           [
             "/html/rendering/bindings/the-textarea-element-0/textarea-ref.html",
             "=="
           ]
         ],
         "url": "/html/rendering/bindings/the-textarea-element-0/rows-zero.html"
       }
     ],
+    "html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html": [
+      {
+        "path": "html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html",
+        "references": [
+          [
+            "/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html",
+            "=="
+          ]
+        ],
+        "url": "/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html"
+      }
+    ],
     "html/rendering/non-replaced-elements/flow-content-0/figure.html": [
       {
         "path": "html/rendering/non-replaced-elements/flow-content-0/figure.html",
         "references": [
           [
             "/html/rendering/non-replaced-elements/flow-content-0/figure-ref.html",
             "=="
           ]
@@ -35311,12 +35326,12 @@
             "/webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped-ref.html",
             "=="
           ]
         ],
         "url": "/webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped.html"
       }
     ]
   },
-  "rev": "886dea2c3dbb79925360319a6a0f662ce196ab3c",
+  "rev": "9a49a8ea7405280364a8aa27d47bfb19af119bb4",
   "url_base": "/",
   "version": 2
 }
--- a/testing/web-platform/meta/mozilla-sync
+++ b/testing/web-platform/meta/mozilla-sync
@@ -1,1 +1,1 @@
-0b6a123899da549977c73b35cf42d69daa94d823
\ No newline at end of file
+b6870b8795b5688a994267dfa50b4558218061d9
\ No newline at end of file
--- a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace.html
+++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace.html
@@ -8,32 +8,27 @@
 "use strict";
 /**
  * This tests the namespace of elements created by the Document interface's
  * createElement() method.  See bug:
  * https://www.w3.org/Bugs/Public/show_bug.cgi?id=19431
  */
 
 /**
- * Test that an element created using the Document object doc has the namespace
- * that would be expected for the given contentType.
+ * Test that an element created using the Document object doc has the HTML
+ * namespace.
  */
 function testDoc(doc, contentType) {
-  // WebKit doesn't support document.contentType, so they don't get this sanity
-  // check :(
   if (doc.contentType !== undefined) {
+    // Sanity check
     assert_equals(doc.contentType, contentType,
                   "Wrong MIME type -- incorrect server config?");
   }
 
-  var expectedNamespace = contentType == "text/html" ||
-                          contentType == "application/xhtml+xml"
-                          ? "http://www.w3.org/1999/xhtml" : null;
-
-  assert_equals(doc.createElement("x").namespaceURI, expectedNamespace);
+  assert_equals(doc.createElement("x").namespaceURI, "http://www.w3.org/1999/xhtml");
 }
 
 // First test various objects we create in JS
 test(function() {
   testDoc(document, "text/html")
 }, "Created element's namespace in current document");
 test(function() {
   testDoc(document.implementation.createHTMLDocument(""), "text/html");
--- a/testing/web-platform/tests/dom/nodes/Node-lookupNamespaceURI.html
+++ b/testing/web-platform/tests/dom/nodes/Node-lookupNamespaceURI.html
@@ -18,97 +18,94 @@ function lookupNamespaceURI(node, prefix
 function isDefaultNamespace(node, namespace, expected, name) {
   test(function() {
     assert_equals(node.isDefaultNamespace(namespace), expected);
   }, name);
 }
 
 
 var frag = document.createDocumentFragment();
-lookupNamespaceURI(frag, null, null, 'DocumentFragment should have null namespace');
-lookupNamespaceURI(frag, '', null, 'DocumentFragment should have null namespace');
-lookupNamespaceURI(frag, 'foo', null, 'DocumentFragment should have null namespace');
-lookupNamespaceURI(frag, 'xmlns', null, 'DocumentFragment should have null namespace');
-isDefaultNamespace(frag, null, true, 'DocumentFragment is in default namespace');
-isDefaultNamespace(frag, '', true, 'DocumentFragment is in default namespace');
-isDefaultNamespace(frag, 'foo', false, 'DocumentFragment is in default namespace');
-isDefaultNamespace(frag, 'xmlns', false, 'DocumentFragment is in default namespace');
+lookupNamespaceURI(frag, null, null, 'DocumentFragment should have null namespace, prefix null');
+lookupNamespaceURI(frag, '', null, 'DocumentFragment should have null namespace, prefix ""');
+lookupNamespaceURI(frag, 'foo', null, 'DocumentFragment should have null namespace, prefix "foo"');
+lookupNamespaceURI(frag, 'xmlns', null, 'DocumentFragment should have null namespace, prefix "xmlns"');
+isDefaultNamespace(frag, null, true, 'DocumentFragment is in default namespace, prefix null');
+isDefaultNamespace(frag, '', true, 'DocumentFragment is in default namespace, prefix ""');
+isDefaultNamespace(frag, 'foo', false, 'DocumentFragment is in default namespace, prefix "foo"');
+isDefaultNamespace(frag, 'xmlns', false, 'DocumentFragment is in default namespace, prefix "xmlns"');
 
 
 
 var fooElem = document.createElementNS('fooNamespace', 'prefix:elem');
 fooElem.setAttribute('bar', 'value');
 
-lookupNamespaceURI(fooElem, null, null, 'Element should have null namespace');
-lookupNamespaceURI(fooElem, '', null, 'Element should have null namespace');
+lookupNamespaceURI(fooElem, null, null, 'Element should have null namespace, prefix null');
+lookupNamespaceURI(fooElem, '', null, 'Element should have null namespace, prefix ""');
 lookupNamespaceURI(fooElem, 'fooNamespace', null, 'Element should not have namespace matching prefix with namespaceURI value');
 lookupNamespaceURI(fooElem, 'xmlns', null, 'Element should not have XMLNS namespace');
 lookupNamespaceURI(fooElem, 'prefix', 'fooNamespace', 'Element has namespace URI matching prefix');
-isDefaultNamespace(fooElem, null, true, 'Empty namespace is not default');
-isDefaultNamespace(fooElem, '', true, 'Empty namespace is not default');
+isDefaultNamespace(fooElem, null, true, 'Empty namespace is not default, prefix null');
+isDefaultNamespace(fooElem, '', true, 'Empty namespace is not default, prefix ""');
 isDefaultNamespace(fooElem, 'fooNamespace', false, 'fooNamespace is not default');
 isDefaultNamespace(fooElem, 'http://www.w3.org/2000/xmlns/', false, 'xmlns namespace is not default');
 
 fooElem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:bar', 'barURI');
 fooElem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns', 'bazURI');
 
-lookupNamespaceURI(fooElem, null, 'bazURI', 'Element should have baz namespace');
-lookupNamespaceURI(fooElem, '', 'bazURI', 'Element should have baz namespace');
-lookupNamespaceURI(fooElem, 'prefix', 'fooNamespace', 'Element has namespace URI matching prefix');
+lookupNamespaceURI(fooElem, null, 'bazURI', 'Element should have baz namespace, prefix null');
+lookupNamespaceURI(fooElem, '', 'bazURI', 'Element should have baz namespace, prefix ""');
 lookupNamespaceURI(fooElem, 'xmlns', null, 'Element does not has namespace with xlmns prefix');
 lookupNamespaceURI(fooElem, 'bar', 'barURI', 'Element has bar namespace');
 
-isDefaultNamespace(fooElem, null, false, 'Empty namespace is not default');
-isDefaultNamespace(fooElem, '', false, 'Empty namespace is not default');
-isDefaultNamespace(fooElem, 'fooNamespace', false, 'fooNamespace is not default');
-isDefaultNamespace(fooElem, 'http://www.w3.org/2000/xmlns/', false, 'xmlns namespace is not default');
+isDefaultNamespace(fooElem, null, false, 'Empty namespace is not default on fooElem, prefix null');
+isDefaultNamespace(fooElem, '', false, 'Empty namespace is not default on fooElem, prefix ""');
 isDefaultNamespace(fooElem, 'barURI', false, 'bar namespace is not default');
 isDefaultNamespace(fooElem, 'bazURI', true, 'baz namespace is default');
 
 var comment = document.createComment('comment');
 fooElem.appendChild(comment);
 
 lookupNamespaceURI(comment, null, 'bazURI', 'Comment should inherit baz namespace');
 lookupNamespaceURI(comment, '', 'bazURI', 'Comment should inherit  baz namespace');
 lookupNamespaceURI(comment, 'prefix', 'fooNamespace', 'Comment should inherit namespace URI matching prefix');
 lookupNamespaceURI(comment, 'bar', 'barURI', 'Comment should inherit bar namespace');
 
-isDefaultNamespace(comment, null, false, 'For comment, empty namespace is not default');
-isDefaultNamespace(comment, '', false, 'For comment, empty namespace is not default');
+isDefaultNamespace(comment, null, false, 'For comment, empty namespace is not default, prefix null');
+isDefaultNamespace(comment, '', false, 'For comment, empty namespace is not default, prefix ""');
 isDefaultNamespace(comment, 'fooNamespace', false, 'For comment, fooNamespace is not default');
 isDefaultNamespace(comment, 'http://www.w3.org/2000/xmlns/', false, 'For comment, xmlns namespace is not default');
 isDefaultNamespace(comment, 'barURI', false, 'For comment, inherited bar namespace is not default');
 isDefaultNamespace(comment, 'bazURI', true, 'For comment, inherited baz namespace is default');
 
 var fooChild = document.createElementNS('childNamespace', 'childElem');
 fooElem.appendChild(fooChild);
 
 lookupNamespaceURI(fooChild, null, 'childNamespace', 'Child element should inherit baz namespace');
 lookupNamespaceURI(fooChild, '', 'childNamespace', 'Child element should have null namespace');
 lookupNamespaceURI(fooChild, 'xmlns', null, 'Child element should not have XMLNS namespace');
 lookupNamespaceURI(fooChild, 'prefix', 'fooNamespace', 'Child element has namespace URI matching prefix');
 
-isDefaultNamespace(fooChild, null, false, 'Empty namespace is not default for child');
-isDefaultNamespace(fooChild, '', false, 'Empty namespace is not default for child');
+isDefaultNamespace(fooChild, null, false, 'Empty namespace is not default for child, prefix null');
+isDefaultNamespace(fooChild, '', false, 'Empty namespace is not default for child, prefix ""');
 isDefaultNamespace(fooChild, 'fooNamespace', false, 'fooNamespace is not default for child');
 isDefaultNamespace(fooChild, 'http://www.w3.org/2000/xmlns/', false, 'xmlns namespace is not default for child');
 isDefaultNamespace(fooChild, 'barURI', false, 'bar namespace is not default for child');
 isDefaultNamespace(fooChild, 'bazURI', false, 'baz namespace is default for child');
 isDefaultNamespace(fooChild, 'childNamespace', true, 'childNamespace is default for child');
 
 document.documentElement.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:bar', 'barURI');
 document.documentElement.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns', 'bazURI');
 
-lookupNamespaceURI(document, null, 'http://www.w3.org/1999/xhtml', 'Document should have xhtml namespace');
-lookupNamespaceURI(document, '', 'http://www.w3.org/1999/xhtml', 'Document should have xhtml namespace');
+lookupNamespaceURI(document, null, 'http://www.w3.org/1999/xhtml', 'Document should have xhtml namespace, prefix null');
+lookupNamespaceURI(document, '', 'http://www.w3.org/1999/xhtml', 'Document should have xhtml namespace, prefix ""');
 lookupNamespaceURI(document, 'prefix', null, 'Document has no namespace URI matching prefix');
 lookupNamespaceURI(document, 'bar', 'barURI', 'Document has bar namespace');
 
-isDefaultNamespace(document, null, false, 'For document, Empty namespace is not default');
-isDefaultNamespace(document, '', false, 'For document, Empty namespace is not default');
+isDefaultNamespace(document, null, false, 'For document, empty namespace is not default, prefix null');
+isDefaultNamespace(document, '', false, 'For document, empty namespace is not default, prefix ""');
 isDefaultNamespace(document, 'fooNamespace', false, 'For document, fooNamespace is not default');
 isDefaultNamespace(document, 'http://www.w3.org/2000/xmlns/', false, 'For document, xmlns namespace is not default');
 isDefaultNamespace(document, 'barURI', false, 'For document, bar namespace is not default');
 isDefaultNamespace(document, 'bazURI', false, 'For document, baz namespace is not default');
 isDefaultNamespace(document, 'http://www.w3.org/1999/xhtml', true, 'For document, xhtml namespace is default');
 
 var comment = document.createComment('comment');
 document.appendChild(comment);
--- a/testing/web-platform/tests/dom/nodes/getElementsByClassName-10.xml
+++ b/testing/web-platform/tests/dom/nodes/getElementsByClassName-10.xml
@@ -1,17 +1,19 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:g="http://www.w3.org/2000/svg">
  <head>
   <title>document.getElementsByClassName(): compound</title>
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
   <div id="log"/>
-  <x class="a"/>
-  <g:x class="a"/>
+  <div id="tests">
+    <x class="a"/>
+    <g:x class="a"/>
+  </div>
   <script>test(function() {
                  assert_array_equals(document.getElementsByClassName("a"),
-                                     document.getElementsByTagName("x"));
+                                     document.getElementById("tests").children);
                })
   </script>
  </body>
 </html>
--- a/testing/web-platform/tests/dom/nodes/getElementsByClassName-11.xml
+++ b/testing/web-platform/tests/dom/nodes/getElementsByClassName-11.xml
@@ -1,22 +1,24 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:g="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:t="http://tc.labs.opera.com/#test">
  <head>
   <title>document.getElementsByClassName(): "tricky" compound</title>
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
   <div id="log" />
-  <x class="a"/>
-  <g:x class="a"/>
-  <x t:class="a" h:class="a" g:class="a"/>
-  <g:x t:class="a" h:class="a" g:class="a"/>
-  <t:x class="a" t:class="a" h:class="a" g:class="a"/>
+  <div id="tests">
+    <x class="a"/>
+    <g:x class="a"/>
+    <x t:class="a" h:class="a" g:class="a"/>
+    <g:x t:class="a" h:class="a" g:class="a"/>
+    <t:x class="a" t:class="a" h:class="a" g:class="a"/>
+  </div>
   <script>
    test(function() {
           var collection = document.getElementsByClassName("a");
-          var test = document.getElementsByTagName("x");
-          assert_array_equals(collection, [test[0], test[1]]);
+          var test = document.getElementById("tests").children;
+          assert_array_equals(collection, [test[0], test[1], test[4]]);
          })
   </script>
  </body>
 </html>
--- a/testing/web-platform/tests/dom/nodes/selectors.js
+++ b/testing/web-platform/tests/dom/nodes/selectors.js
@@ -261,36 +261,34 @@ var validSelectors = [
   // - ::after
   {name: ":after pseudo-element (one-colon syntax) selector, not matching any elements",         selector: "#pseudo-element:after",         expect: [] /*no matches*/, level: 2, testType: TEST_QSA},
   {name: "::after pseudo-element (two-colon syntax) selector, not matching any elements",        selector: "#pseudo-element::after",        expect: [] /*no matches*/, level: 3, testType: TEST_QSA},
 
   // Class Selectors
   {name: "Class selector, matching element with specified class",                                           selector: ".class-p",                expect: ["class-p1","class-p2", "class-p3"],                                              level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Class selector, chained, matching only elements with all specified classes",                      selector: "#class .apple.orange.banana",    expect: ["class-div1", "class-div2", "class-p4", "class-div3", "class-p6", "class-div4"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Class Selector, chained, with type selector",                                                     selector: "div.apple.banana.orange", expect: ["class-div1", "class-div2", "class-div3", "class-div4"],                         level: 1, testType: TEST_QSA | TEST_MATCH},
-  // Caution: If copying and pasting the folowing non-ASCII classes, ensure unicode normalisation is not performed in the process.
-  {name: "Class selector, matching element with class value using non-ASCII characters",                    selector: ".台北Táiběi",             expect: ["class-span1"],               level: 1, testType: TEST_QSA | TEST_MATCH},
-  {name: "Class selector, matching multiple elements with class value using non-ASCII characters",          selector: ".台北",                     expect: ["class-span1","class-span2"], level: 1, testType: TEST_QSA | TEST_MATCH},
-  {name: "Class selector, chained, matching element with multiple class values using non-ASCII characters", selector: ".台北Táiběi.台北",          expect: ["class-span1"],               level: 1, testType: TEST_QSA | TEST_MATCH},
+  {name: "Class selector, matching element with class value using non-ASCII characters (1)",                selector: ".\u53F0\u5317Ta\u0301ibe\u030Ci",             expect: ["class-span1"],               level: 1, testType: TEST_QSA | TEST_MATCH},
+  {name: "Class selector, matching multiple elements with class value using non-ASCII characters",          selector: ".\u53F0\u5317",                     expect: ["class-span1","class-span2"], level: 1, testType: TEST_QSA | TEST_MATCH},
+  {name: "Class selector, chained, matching element with multiple class values using non-ASCII characters (1)", selector: ".\u53F0\u5317Ta\u0301ibe\u030Ci.\u53F0\u5317",          expect: ["class-span1"],               level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Class selector, matching element with class with escaped character",                              selector: ".foo\\:bar",              expect: ["class-span3"],               level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Class selector, matching element with class with escaped character",                              selector: ".test\\.foo\\[5\\]bar",   expect: ["class-span4"],               level: 1, testType: TEST_QSA | TEST_MATCH},
 
   // ID Selectors
   {name: "ID selector, matching element with specified id",           selector: "#id #id-div1",              expect: ["id-div1"],            level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "ID selector, chained, matching element with specified id",  selector: "#id-div1, #id-div1",        expect: ["id-div1"],            level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "ID selector, chained, matching element with specified id",  selector: "#id-div1, #id-div2",        expect: ["id-div1", "id-div2"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "ID Selector, chained, with type selector",                  selector: "div#id-div1, div#id-div2",  expect: ["id-div1", "id-div2"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "ID selector, not matching non-existent descendant",         selector: "#id #none",                 expect: [] /*no matches*/,      level: 1, testType: TEST_QSA},
   {name: "ID selector, not matching non-existent ancestor",           selector: "#none #id-div1",            expect: [] /*no matches*/,      level: 1, testType: TEST_QSA},
   {name: "ID selector, matching multiple elements with duplicate id", selector: "#id-li-duplicate",          expect: ["id-li-duplicate", "id-li-duplicate", "id-li-duplicate", "id-li-duplicate"], level: 1, testType: TEST_QSA | TEST_MATCH},
 
-  // Caution: If copying and pasting the folowing non-ASCII IDs, ensure unicode normalisation is not performed in the process.
-  {name: "ID selector, matching id value using non-ASCII characters",    selector: "#台北Táiběi",           expect: ["台北Táiběi"],       level: 1, testType: TEST_QSA | TEST_MATCH},
-  {name: "ID selector, matching id value using non-ASCII characters",    selector: "#台北",                   expect: ["台北"],               level: 1, testType: TEST_QSA | TEST_MATCH},
-  {name: "ID selector, matching id values using non-ASCII characters",   selector: "#台北Táiběi, #台北",      expect: ["台北Táiběi", "台北"], level: 1, testType: TEST_QSA | TEST_MATCH},
+  {name: "ID selector, matching id value using non-ASCII characters (1)",    selector: "#\u53F0\u5317Ta\u0301ibe\u030Ci",           expect: ["\u53F0\u5317Ta\u0301ibe\u030Ci"],       level: 1, testType: TEST_QSA | TEST_MATCH},
+  {name: "ID selector, matching id value using non-ASCII characters (2)",    selector: "#\u53F0\u5317",                   expect: ["\u53F0\u5317"],               level: 1, testType: TEST_QSA | TEST_MATCH},
+  {name: "ID selector, matching id values using non-ASCII characters (1)", selector: "#\u53F0\u5317Ta\u0301ibe\u030Ci, #\u53F0\u5317",      expect: ["\u53F0\u5317Ta\u0301ibe\u030Ci", "\u53F0\u5317"], level: 1, testType: TEST_QSA | TEST_MATCH},
 
   // XXX runMatchesTest() in level2-lib.js can't handle this because obtaining the expected nodes requires escaping characters when generating the selector from 'expect' values
   {name: "ID selector, matching element with id with escaped character", selector: "#\\#foo\\:bar",         expect: ["#foo:bar"],         level: 1, testType: TEST_QSA},
   {name: "ID selector, matching element with id with escaped character", selector: "#test\\.foo\\[5\\]bar", expect: ["test.foo[5]bar"],   level: 1, testType: TEST_QSA},
 
   // Namespaces
   // XXX runMatchesTest() in level2-lib.js can't handle these because non-HTML elements don't have a recognised id
   {name: "Namespace selector, matching element with any namespace",        selector: "#any-namespace *|div", expect: ["any-namespace-div1", "any-namespace-div2", "any-namespace-div3", "any-namespace-div4"], level: 3, testType: TEST_QSA},
@@ -626,36 +624,34 @@ var scopedSelectors = [
   // - ::after
   {name: ":after pseudo-element (one-colon syntax) selector, not matching any elements",         selector: "#pseudo-element:after",         ctx: "", expect: [] /*no matches*/, level: 2, testType: TEST_FIND},
   {name: "::after pseudo-element (two-colon syntax) selector, not matching any elements",        selector: "#pseudo-element::after",        ctx: "", expect: [] /*no matches*/, level: 3, testType: TEST_FIND},
 
   // Class Selectors
   {name: "Class selector, matching element with specified class (1)",                                           selector: ".class-p",                ctx: "", expect: ["class-p1","class-p2", "class-p3"],                                              level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "Class selector, chained, matching only elements with all specified classes (1)",                      selector: "#class .apple.orange.banana",    ctx: "", expect: ["class-div1", "class-div2", "class-p4", "class-div3", "class-p6", "class-div4"], level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "Class Selector, chained, with type selector (1)",                                                     selector: "div.apple.banana.orange", ctx: "", expect: ["class-div1", "class-div2", "class-div3", "class-div4"],                         level: 1, testType: TEST_FIND | TEST_MATCH},
-  // Caution: If copying and pasting the folowing non-ASCII classes, ensure unicode normalisation is not performed in the process.
-  {name: "Class selector, matching element with class value using non-ASCII characters",                    selector: ".台北Táiběi",             ctx: "", expect: ["class-span1"],               level: 1, testType: TEST_FIND | TEST_MATCH},
-  {name: "Class selector, matching multiple elements with class value using non-ASCII characters (1)",          selector: ".台北",                     ctx: "", expect: ["class-span1","class-span2"], level: 1, testType: TEST_FIND | TEST_MATCH},
-  {name: "Class selector, chained, matching element with multiple class values using non-ASCII characters", selector: ".台北Táiběi.台北",          ctx: "", expect: ["class-span1"],               level: 1, testType: TEST_FIND | TEST_MATCH},
+  {name: "Class selector, matching element with class value using non-ASCII characters (2)",                    selector: ".\u53F0\u5317Ta\u0301ibe\u030Ci",             ctx: "", expect: ["class-span1"],               level: 1, testType: TEST_FIND | TEST_MATCH},
+  {name: "Class selector, matching multiple elements with class value using non-ASCII characters (1)",          selector: ".\u53F0\u5317",                     ctx: "", expect: ["class-span1","class-span2"], level: 1, testType: TEST_FIND | TEST_MATCH},
+  {name: "Class selector, chained, matching element with multiple class values using non-ASCII characters (2)", selector: ".\u53F0\u5317Ta\u0301ibe\u030Ci.\u53F0\u5317",          ctx: "", expect: ["class-span1"],               level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "Class selector, matching element with class with escaped character (1)",                              selector: ".foo\\:bar",              ctx: "", expect: ["class-span3"],               level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "Class selector, matching element with class with escaped character (1)",                              selector: ".test\\.foo\\[5\\]bar",   ctx: "", expect: ["class-span4"],               level: 1, testType: TEST_FIND | TEST_MATCH},
 
   // ID Selectors
   {name: "ID selector, matching element with specified id (1)",           selector: "#id #id-div1",              ctx: "", expect: ["id-div1"],            level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "ID selector, chained, matching element with specified id (1)",  selector: "#id-div1, #id-div1",        ctx: "", expect: ["id-div1"],            level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "ID selector, chained, matching element with specified id (1)",  selector: "#id-div1, #id-div2",        ctx: "", expect: ["id-div1", "id-div2"], level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "ID Selector, chained, with type selector (1)",                  selector: "div#id-div1, div#id-div2",  ctx: "", expect: ["id-div1", "id-div2"], level: 1, testType: TEST_FIND | TEST_MATCH},
   {name: "ID selector, not matching non-existent descendant",         selector: "#id #none",                 ctx: "", expect: [] /*no matches*/,      level: 1, testType: TEST_FIND},
   {name: "ID selector, not matching non-existent ancestor",           selector: "#none #id-div1",            ctx: "", expect: [] /*no matches*/,      level: 1, testType: TEST_FIND},
   {name: "ID selector, matching multiple elements with duplicate id (1)", selector: "#id-li-duplicate",          ctx: "", expect: ["id-li-duplicate", "id-li-duplicate", "id-li-duplicate", "id-li-duplicate"], level: 1, testType: TEST_FIND | TEST_MATCH},
 
-  // Caution: If copying and pasting the folowing non-ASCII IDs, ensure unicode normalisation is not performed in the process.
-  {name: "ID selector, matching id value using non-ASCII characters",    selector: "#台北Táiběi",           ctx: "", expect: ["台北Táiběi"],       level: 1, testType: TEST_FIND | TEST_MATCH},
-  {name: "ID selector, matching id value using non-ASCII characters (1)",    selector: "#台北",                   ctx: "", expect: ["台北"],               level: 1, testType: TEST_FIND | TEST_MATCH},
-  {name: "ID selector, matching id values using non-ASCII characters",   selector: "#台北Táiběi, #台北",      ctx: "", expect: ["台北Táiběi", "台北"], level: 1, testType: TEST_FIND | TEST_MATCH},
+  {name: "ID selector, matching id value using non-ASCII characters (3)",    selector: "#\u53F0\u5317Ta\u0301ibe\u030Ci",           ctx: "", expect: ["\u53F0\u5317Ta\u0301ibe\u030Ci"],       level: 1, testType: TEST_FIND | TEST_MATCH},
+  {name: "ID selector, matching id value using non-ASCII characters (4)",    selector: "#\u53F0\u5317",                   ctx: "", expect: ["\u53F0\u5317"],               level: 1, testType: TEST_FIND | TEST_MATCH},
+  {name: "ID selector, matching id values using non-ASCII characters (2)",   selector: "#\u53F0\u5317Ta\u0301ibe\u030Ci, #\u53F0\u5317",      ctx: "", expect: ["\u53F0\u5317Ta\u0301ibe\u030Ci", "\u53F0\u5317"], level: 1, testType: TEST_FIND | TEST_MATCH},
 
   // XXX runMatchesTest() in level2-lib.js can't handle this because obtaining the expected nodes requires escaping characters when generating the selector from 'expect' values
   {name: "ID selector, matching element with id with escaped character", selector: "#\\#foo\\:bar",         ctx: "", expect: ["#foo:bar"],         level: 1, testType: TEST_FIND},
   {name: "ID selector, matching element with id with escaped character", selector: "#test\\.foo\\[5\\]bar", ctx: "", expect: ["test.foo[5]bar"],   level: 1, testType: TEST_FIND},
 
   // Namespaces
   // XXX runMatchesTest() in level2-lib.js can't handle these because non-HTML elements don't have a recognised id
   {name: "Namespace selector, matching element with any namespace",        selector: "#any-namespace *|div", ctx: "", expect: ["any-namespace-div1", "any-namespace-div2", "any-namespace-div3", "any-namespace-div4"], level: 3, testType: TEST_FIND},
--- a/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/unload/008.html
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/unload/008.html
@@ -1,14 +1,16 @@
 <!doctype html>
 <title>pagehide IDL attribute</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 var iframe;
 var t = async_test();
-onload = setTimeout(function() {
-                      var iframe = document.getElementsByTagName("iframe")[0];
-                      iframe.src="about:blank";
-                    }, 100)
+onload = function() {
+  setTimeout(function() {
+    var iframe = document.getElementsByTagName("iframe")[0];
+    iframe.src="about:blank";
+  }, 100)
+};
 </script>
 <iframe src="008-1.html"></iframe>
--- a/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/unload/009.html
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/unload/009.html
@@ -1,14 +1,16 @@
 <!doctype html>
 <title>unload IDL attribute</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 var iframe;
 var t = async_test();
-onload = setTimeout(function() {
-                      var iframe = document.getElementsByTagName("iframe")[0];
-                      iframe.src="about:blank";
-                    }, 100)
+onload = function() {
+  setTimeout(function() {
+    var iframe = document.getElementsByTagName("iframe")[0];
+    iframe.src="about:blank";
+  }, 100)
+}
 </script>
 <iframe src="009-1.html"></iframe>
--- a/testing/web-platform/tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
+++ b/testing/web-platform/tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
@@ -4,30 +4,32 @@
 <title>HTMLAllCollection Tests</title>
 <link rel="author" title="Dan Druta" href="mailto:dan.druta@att.com"/>
 <link rel="help" href="2.7.2.1 - Common Infrastructure/Common DOM Interfaces/Collections/HTMLAllCollection"/>
 <meta name="flags" content="TOKENS" />
 <meta name="assert" content="TEST ASSERTION"/>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 </head>
-<body>
+<body id="tags">
 <img src="../../../../images/green.png" name="picture">
 <script>
 test(function(){ assert_equals(document.all.length,12)}, "Test for HTMLAllCollection size");
 
 test(function(){ assert_equals(document.all.item(0).tagName,"HTML")}, "Test lookup by index using ()");
 
 test(function(){ assert_equals(document.all[0].tagName,"HTML")}, "Test lookup by index using []");
 
-test(function(){ assert_equals(document.all.tags("script").length,3)}, "Test for multiple occurence 3 <script> found");
-
 test(function(){ assert_equals(document.all.item("picture").nodeName,"IMG")}, "Test lookup IMG by name");
 
 test(function(){ assert_equals(document.all.namedItem("picture").nodeName,"IMG")}, "Test lookup IMG by namedItem ");
 
 test(function(){ assert_equals(document.all("picture").nodeName,"IMG")}, "Test lookup IMG in collection using ()");
 
 test(function(){ assert_equals(document.all["picture"].nodeName,"IMG")}, "Test lookup IMG in collection using []");
+
+test(function(){ assert_equals(document.all.picture.nodeName,"IMG")}, "Test lookup IMG in collection using .");
+
+test(function(){ assert_equals(document.all.tags.id,"tags")}, "Test lookup tags in collection using .");
 </script>
 <div id="log"></div>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/testing/web-platform/tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
+++ b/testing/web-platform/tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
@@ -13,18 +13,22 @@
 <form id="f2">
   <table>
     <tr>
       <td>
         <input type="checkbox" id="cb">
         <input type="checkbox" name="cb">
       </td>
     </tr>
-    <button id="btn"></button>
-    <button name="btn"></button>
+    <tr>
+      <td>
+        <button id="btn"></button>
+        <button name="btn"></button>
+      </td>
+    </tr>
   </table>
 </form>
 
 <script>
 
 var coll1, coll2, rdo;
 
 setup(function () {
@@ -45,18 +49,18 @@ test(function () {
 }, "HTMLFormControlsCollection.item(index) must return the indexed item");
 
 test(function () {
   assert_equals(coll1[0], rdo, "HTMLFormControlsCollection[index] should return the 'input' element in radio status.");
 }, "HTMLFormControlsCollection[index] must return the indexed item");
 
 //getter - name
 test(function () {
-  assert_equals(coll1("r1"), rdo, "HTMLFormControlsCollection(name) should return the 'input' element in radio status.");
-}, "HTMLFormControlsCollection(name) must return the named item");
+  assert_throws(TypeError(), function() { coll1("r1") });
+}, "HTMLFormControlsCollection is not callable");
 
 test(function () {
   assert_equals(coll1["r1"], rdo, "HTMLFormControlsCollection[name] should return the 'input' element in radio status.");
 }, "HTMLFormControlsCollection[name] must return the named item");
 
 //getter - namedItem
 test(function () {
   assert_equals(coll1.namedItem("r1"), rdo, "HTMLFormControlsCollection.namedItem(name) should return the 'input' element in radio status.");
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<link rel="match" href="div-align-ref.html">
+<style>
+.test { width: 50px; background-color: yellow; }
+.center { text-align: center; }
+.center .test { margin: 0 auto; }
+.left { text-align: left; }
+.left .test { margin-right: auto; }
+.right { text-align: right; }
+.right .test { margin-left: auto; }
+.rtl { direction: rtl; }
+.ltr { direction: ltr; }
+.left .margin { margin-left: 1em; }
+.right .margin { margin-right: 1em; }
+</style>
+</head>
+<body>
+<!-- Centered tests -->
+<div class=center>
+<div class=test>t א</div>
+<div class="test rtl">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div class=center>
+<div class="test left">t א</div>
+<div class="test right">t א</div>
+</div>
+
+<div class=left>
+<div class=center>
+<div class=test>t א</div>
+</div>
+</div>
+
+<!-- Left-aligned tests -->
+<div class=left>
+<div class=test>t א</div>
+<div class="test rtl">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div class="left rtl">
+<div class=test>t א</div>
+<div class="test ltr">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div class=left>
+<div class="test center">t א</div>
+<div class="test right">t א</div>
+</div>
+
+<!-- Right-aligned tests -->
+<div class=right>
+<div class=test>t א</div>
+<div class="test rtl">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div class="right rtl">
+<div class=test>t א</div>
+<div class="test ltr">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div class=right>
+<div class="test left">t א</div>
+<div class="test center">t א</div>
+</div>
+
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/rendering/non-replaced-elements/flow-content-0/div-align.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+.test { width: 50px; background-color: yellow; }
+.rtl { direction: rtl; }
+.ltr { direction: ltr; }
+[align=left] .margin { margin-left: 1em }
+[align=right] .margin { margin-right: 1em }
+</style>
+</head>
+<body>
+<!-- Centered tests -->
+<div align=center>
+<div class=test>t א</div>
+<div class="test rtl">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div align=center>
+<div class=test align=left>t א</div>
+<div class=test align=right>t א</div>
+</div>
+
+<div align=left>
+<div align=center>
+<div class=test>t א</div>
+</div>
+</div>
+
+<!-- Left-aligned tests -->
+<div align=left>
+<div class=test>t א</div>
+<div class="test rtl">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div align=left class=rtl>
+<div class=test>t א</div>
+<div class="test ltr">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div align=left>
+<div class=test align=center>t א</div>
+<div class=test align=right>t א</div>
+</div>
+
+<!-- Right-aligned tests -->
+<div align=right>
+<div class=test>t א</div>
+<div class="test rtl">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div align=right class=rtl>
+<div class=test>t א</div>
+<div class="test ltr">t א</div>
+<div class="test margin">t א</div>
+</div>
+
+<div align=right>
+<div class=test align=left>t א</div>
+<div class=test align=center>t א</div>
+</div>
+
+</body>
+</html>
+
--- a/testing/web-platform/tests/html/semantics/forms/the-option-element/option-text-recurse.html
+++ b/testing/web-platform/tests/html/semantics/forms/the-option-element/option-text-recurse.html
@@ -69,9 +69,24 @@ test(function() {
   assert_equals(option.text, "text");
 }, "option.text should work if the option is in an SVG script element");
 test(function() {
   var script = document.createElementNS("http://www.w3.org/1998/Math/MathML", "script");
   var option = script.appendChild(document.createElement("option"));
   option.appendChild(document.createTextNode("text"));
   assert_equals(option.text, "text");
 }, "option.text should work if the option is in a MathML script element");
+
+test(function() {
+  var option = document.createElement("option");
+  option.appendChild(document.createTextNode("te"));
+  option.appendChild(document.createComment("comment"));
+  option.appendChild(document.createTextNode("xt"));
+  assert_equals(option.text, "text");
+}, "option.text should ignore comment children");
+test(function() {
+  var option = document.createElement("option");
+  option.appendChild(document.createTextNode("te"));
+  option.appendChild(document.createProcessingInstruction("target", "data"));
+  option.appendChild(document.createTextNode("xt"));
+  assert_equals(option.text, "text");
+}, "option.text should ignore PI children");
 </script>
--- a/testing/web-platform/tests/html/semantics/tabular-data/the-tbody-element/deleteRow.html
+++ b/testing/web-platform/tests/html/semantics/tabular-data/the-tbody-element/deleteRow.html
@@ -38,9 +38,17 @@ test(function () {
 }, "HTMLTableSectionElement deleteRow(rows.length)");
 
 test(function () {
   assert_throws("IndexSizeError", function () {
     tbody.deleteRow(-2);
   });
 }, "HTMLTableSectionElement deleteRow(-2)");
 
+test(function () {
+  assert_equals(tbody.rows.length, 1);
+  tbody.deleteRow(-1);
+  assert_equals(tbody.rows.length, 0);
+  tbody.deleteRow(-1);
+  assert_equals(tbody.rows.length, 0);
+}, "HTMLTableSectionElement deleteRow(-1) with no rows");
+
 </script>
--- a/testing/web-platform/tests/html/semantics/tabular-data/the-tbody-element/insertRow.html
+++ b/testing/web-platform/tests/html/semantics/tabular-data/the-tbody-element/insertRow.html
@@ -31,16 +31,22 @@ test(function () {
 
 test(function () {
   var trEle = tbody.insertRow();
   assert_equals(tbody.rows[tbody.rows.length - 1], trEle);
   assert_equals(tbody.rows.length, 4);
 }, "HTMLTableSectionElement insertRow()");
 
 test(function () {
+  var trEle = tbody.insertRow(tbody.rows.length);
+  assert_equals(tbody.rows[tbody.rows.length - 1], trEle);
+  assert_equals(tbody.rows.length, 5);
+}, "HTMLTableSectionElement insertRow(rows.length)");
+
+test(function () {
   assert_throws("IndexSizeError", function () {
     tbody.insertRow(-2);
   });
 }, "HTMLTableSectionElement insertRow(-2)");
 
 test(function () {
   assert_throws("IndexSizeError", function () {
     tbody.insertRow(tbody.rows.length + 1);
--- a/testing/web-platform/tests/lint.whitelist
+++ b/testing/web-platform/tests/lint.whitelist
@@ -103,8 +103,11 @@ PARSE-FAILED:ext-xhtml-pubid/the-xhtml-s
 PRINT STATEMENT:dom/nodes/Document-createElement-namespace-tests/generate.py
 
 # Should probably be fixed.
 W3C-TEST.ORG:subresource-integrity/refresh-header.js.headers
 
 # Lint doesn't know about sub.svg I guess
 PARSE-FAILED:content-security-policy/svg/including.sub.svg
 
+#Helper files that aren't valid XML
+PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/empty.xml
+PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/minimal_html.xml
\ No newline at end of file
--- a/testing/web-platform/tests/subresource-integrity/crossorigin-creds-script.js.sub.headers
+++ b/testing/web-platform/tests/subresource-integrity/crossorigin-creds-script.js.sub.headers
@@ -1,2 +1,2 @@
-Access-Control-Allow-Origin: {{location[scheme]}}://{{domains[]}}:{{location[port]}}
+Access-Control-Allow-Origin: {{location[scheme]}}://{{location[hostname]}}:{{ports[http][0]}}
 Access-Control-Allow-Credentials: true
--- a/testing/web-platform/tests/subresource-integrity/crossorigin-creds-style.css.sub.headers
+++ b/testing/web-platform/tests/subresource-integrity/crossorigin-creds-style.css.sub.headers
@@ -1,2 +1,2 @@
-Access-Control-Allow-Origin: {{location[scheme]}}://{{domains[]}}:{{location[port]}}
+Access-Control-Allow-Origin: {{location[scheme]}}://{{location[hostname]}}:{{ports[http][0]}}
 Access-Control-Allow-Credentials: true
deleted file mode 100644
--- a/testing/web-platform/tests/subresource-integrity/subresource-integrity.html
+++ /dev/null
@@ -1,545 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>Subresource Integrity</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<div id="log"></div>
-
-<div id="container"></div>
-<script>
-    // <script> tests
-    var xorigin_anon_script = location.protocol
-      + '//www1.' + location.hostname + ':' + location.port
-      + '/subresource-integrity/crossorigin-anon-script.js';
-
-    var xorigin_creds_script = location.protocol
-      + '//www1.' + location.hostname + ':' + location.port
-      + '/subresource-integrity/crossorigin-creds-script.js';
-
-    var xorigin_ineligible_script = location.protocol
-      + '//www1.' + location.hostname + ':' + location.port
-      + '/subresource-integrity/crossorigin-ineligible-script.js';
-
-    var SRIScriptTest = function(pass, name, src, integrityValue, crossoriginValue) {
-        this.pass = pass;
-        this.name = "Script: " + name;
-        this.src = src;
-        this.integrityValue = integrityValue;
-        this.crossoriginValue = crossoriginValue;
-    }
-
-    SRIScriptTest.prototype.execute = function() {
-        var test = async_test(this.name);
-        var e = document.createElement("script");
-        e.src = this.src;
-        e.setAttribute("integrity", this.integrityValue);
-        if(this.crossoriginValue) {
-            e.setAttribute("crossorigin", this.crossoriginValue);
-        }
-        if(this.pass) {
-            e.addEventListener("load", function() {test.done()});
-            e.addEventListener("error", function() {
-                test.step(function(){ assert_unreached("Good load fired error handler.") })
-            });
-        } else {
-           e.addEventListener("load", function() {
-                test.step(function() { assert_unreached("Bad load succeeded.") })
-            });
-           e.addEventListener("error", function() {test.done()});
-        }
-        document.body.appendChild(e);
-    };
-
-    var xorigin_anon_style = location.protocol
-      + '//www1.' + location.hostname + ':' + location.port
-      + '/subresource-integrity/crossorigin-anon-style.css';
-
-    var xorigin_creds_style = location.protocol
-      + '//www1.' + location.hostname + ':' + location.port
-      + '/subresource-integrity/crossorigin-creds-style.css';
-
-    var xorigin_ineligible_style = location.protocol
-      + '//www1.' + location.hostname + ':' + location.port
-      + '/subresource-integrity/crossorigin-ineligible-style.css';
-
-    // <link> tests
-    // Style tests must be done synchronously because they rely on the presence
-    // and absence of global style, which can affect later tests. Thus, instead
-    // of executing them one at a time, the style tests are implemented as a
-    // queue that builds up a list of tests, and then executes them one at a
-    // time.
-    var SRIStyleTest = function(queue, pass, name, attrs, customCallback, altPassValue) {
-        this.pass = pass;
-        this.name = "Style: " + name;
-        this.customCallback = customCallback || function () {};
-        this.attrs = attrs || {};
-        this.passValue = altPassValue || "rgb(255, 255, 0)";
-
-        this.test = async_test(this.name);
-
-        this.queue = queue;
-        this.queue.push(this);
-    }
-
-    SRIStyleTest.prototype.execute = function() {
-        var that = this;
-        var container = document.getElementById("container");
-        while (container.hasChildNodes()) {
-          container.removeChild(container.firstChild);
-        }
-
-        var test = this.test;
-
-        var div = document.createElement("div");
-        div.className = "testdiv";
-        var e = document.createElement("link");
-        this.attrs.rel = this.attrs.rel || "stylesheet";
-        for (var key in this.attrs) {
-            if (this.attrs.hasOwnProperty(key)) {
-                e.setAttribute(key, this.attrs[key]);
-            }
-        }
-
-        if(this.pass) {
-            e.addEventListener("load", function() {
-                test.step(function() {
-                    var background = window.getComputedStyle(div, null).getPropertyValue("background-color");
-                    assert_equals(background, that.passValue);
-                    test.done();
-                });
-            });
-            e.addEventListener("error", function() {
-                test.step(function(){ assert_unreached("Good load fired error handler.") })
-            });
-        } else {
-            e.addEventListener("load", function() {
-                 test.step(function() { assert_unreached("Bad load succeeded.") })
-             });
-            e.addEventListener("error", function() {
-                test.step(function() {
-                    var background = window.getComputedStyle(div, null).getPropertyValue("background-color");
-                    assert_not_equals(background, that.passValue);
-                    test.done();
-                });
-            });
-        }
-        container.appendChild(div);
-        container.appendChild(e);
-        this.customCallback(e, container);
-    };
-
-    var style_tests = [];
-    style_tests.execute = function() {
-        if (this.length > 0) {
-            this.shift().execute();
-        }
-    }
-    add_result_callback(function(res) {
-        if (res.name.startsWith("Style: ")) {
-          style_tests.execute();
-        }
-    });
-
-    // Script tests
-    new SRIScriptTest(
-        true,
-        "Same-origin with correct sha256 hash.",
-        "matching-digest.js",
-        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E="
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with correct sha384 hash.",
-        "matching-digest.js",
-        "sha384-BDRTPSywZFyxfLEAzaLcL4FfERBgJgXfEkuT0r04LG93Yqn1PWNYPZMomaqEfE3H"
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with correct sha512 hash.",
-        "matching-digest.js",
-        "sha512-geByvIIRspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg=="
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with empty integrity.",
-        "matching-digest.js",
-        ""
-    ).execute();
-
-    new SRIScriptTest(
-        false,
-        "Same-origin with incorrect hash.",
-        "non-matching-digest.js",
-        "sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with multiple sha256 hashes, including correct.",
-        "matching-digest.js",
-        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E= sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with multiple sha256 hashes, including unknown algorithm.",
-        "matching-digest.js",
-        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E= foo666-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with sha256 mismatch, sha512 match",
-        "matching-digest.js",
-        "sha512-geByvIIRspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg== sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-    ).execute();
-
-    new SRIScriptTest(
-        false,
-        "Same-origin with sha256 match, sha512 mismatch",
-        "matching-digest.js",
-        "sha512-deadbeefspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg== sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E="
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "<crossorigin='anonymous'> with correct hash, ACAO: *",
-        xorigin_anon_script,
-        "sha256-51AjITq701Y0yKSx3/UoIKtIY2UQ9+H8WGyyMuOWOC0=",
-        "anonymous"
-    ).execute();
-
-    new SRIScriptTest(
-        false,
-        "<crossorigin='anonymous'> with incorrect hash, ACAO: *",
-        xorigin_anon_script,
-        "sha256-deadbeefcSLlbFZCj1OACLxTxVck2TOrBTEdUbwz1yU=",
-        "anonymous"
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "<crossorigin='use-credentials'> with correct hash, CORS-eligible",
-        xorigin_creds_script,
-        "sha256-IaGApVboXPQxVSm2wVFmhMq1Yu37gWklajgMdxKLIvc=",
-        "use-credentials"
-    ).execute();
-
-    new SRIScriptTest(
-        false,
-        "<crossorigin='use-credentials'> with incorrect hash CORS-eligible",
-        xorigin_creds_script,
-        "sha256-deadbeef2S+pTRZgiw3DWrhC6JLDlt2zRyGpwH7unU8=",
-        "use-credentials"
-    ).execute();
-
-    new SRIScriptTest(
-        false,
-        "<crossorigin='anonymous'> with CORS-ineligible resource",
-        xorigin_ineligible_script,
-        "sha256-F5fXKTX7SiWjtgybxiBZIo2qhh2WiQnNx372E60XrOo=",
-        "anonymous"
-    ).execute();
-
-    new SRIScriptTest(
-        false,
-        "Cross-origin, not CORS request, with correct hash",
-        xorigin_anon_script,
-        "sha256-51AjITq701Y0yKSx3/UoIKtIY2UQ9+H8WGyyMuOWOC0="
-    ).execute();
-
-    new SRIScriptTest(
-        false,
-        "Cross-origin, not CORS request, with hash mismatch",
-        xorigin_anon_script,
-        "sha256-deadbeef01Y0yKSx3/UoIKtIY2UQ9+H8WGyyMuOWOC0="
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Cross-origin, empty integrity",
-        xorigin_anon_script,
-        ""
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with correct hash, options.",
-        "matching-digest.js",
-        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E=?foo=bar?spam=eggs"
-    ).execute();
-
-    new SRIScriptTest(
-        true,
-        "Same-origin with unknown algorithm only.",
-        "matching-digest.js",
-        "foo666-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E="
-    ).execute();
-
-    // Style tests
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with correct sha256 hash",
-        {
-            href: "style.css?1",
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with correct sha384 hash",
-        {
-            href: "style.css?2",
-            integrity: "sha384-wDAWxH4tOWBwAwHfBn9B7XuNmFxHTMeigAMwn0iVQ0zq3FtmYMLxihcGnU64CwcX"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with correct sha512 hash",
-        {
-            href: "style.css?3",
-            integrity: "sha512-9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2HSZX4l6w=="
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with empty integrity",
-        {
-            href: "style.css?4",
-            integrity: ""
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "Same-origin with incorrect hash.",
-        {
-            href: "style.css?5",
-            integrity: "sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with multiple sha256 hashes, including correct.",
-        {
-            href: "style.css?6",
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4= sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with multiple sha256 hashes, including unknown algorithm.",
-        {
-            href: "style.css?7",
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4= foo666-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with sha256 mismatch, sha512 match",
-        {
-            href: "style.css?8",
-            integrity: "sha512-9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2HSZX4l6w== sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "Same-origin with sha256 match, sha512 mismatch",
-        {
-            href: "style.css?9",
-            integrity: "sha512-deadbeef9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2== sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "<crossorigin='anonymous'> with correct hash, ACAO: *",
-        {
-            href: xorigin_anon_style + '?1',
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
-            crossorigin: "anonymous"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "<crossorigin='anonymous'> with incorrect hash, ACAO: *",
-        {
-            href: xorigin_anon_style + '?2',
-            integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk=",
-            crossorigin: "anonymous"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "<crossorigin='use-credentials'> with correct hash, CORS-eligible",
-        {
-            href: xorigin_creds_style + '?1',
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
-            crossorigin: "use-credentials"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "<crossorigin='use-credentials'> with incorrect hash CORS-eligible",
-        {
-            href: xorigin_creds_style + '?2',
-            integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk=",
-            crossorigin: "use-credentials"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "<crossorigin='anonymous'> with CORS-ineligible resource",
-        {
-            href: xorigin_ineligible_style + '?1',
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
-            crossorigin: "anonymous"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "Cross-origin, not CORS request, with correct hash",
-        {
-            href: xorigin_anon_style + '?3',
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "Cross-origin, not CORS request, with hash mismatch",
-        {
-            href: xorigin_anon_style + '?4',
-            integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk="
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Cross-origin, empty integrity",
-        {
-            href: xorigin_anon_style + '?5',
-            integrity: ""
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with correct hash, options.",
-        {
-            href: "style.css?10",
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=?foo=bar?spam=eggs"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with unknown algorithm only.",
-        {
-            href: "style.css?11",
-            integrity: "foo666-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=?foo=bar?spam=eggs"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with correct sha256 hash, rel='stylesheet license'",
-        {
-            href: "style.css?12",
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
-            rel: "stylesheet license"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with correct sha256 hash, rel='license stylesheet'",
-        {
-            href: "style.css?13",
-            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
-            rel: "license stylesheet"
-        }
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        true,
-        "Same-origin with correct sha256 and sha512 hash, rel='alternate stylesheet' enabled",
-        {
-            href: "alternate.css?1",
-            title: "alt",
-            type: "text/css",
-            class: "alternate",
-            disabled: "disabled",
-            rel: "alternate stylesheet",
-            integrity: "sha256-phbz83bWhnLig+d2VPKrRrTRyhqoDRo1ruGqZLZ0= sha512-8OYEB7ktnzcb6h+kB9CUIuc8qvKIyLpygRJdQSEEycRy74dUsB+Yu9rSjpOPjRUblle8WWX9Gn7v39LK2Oceig==",
-        },
-        function (link, container) {
-            var alternate = document.querySelector('link.alternate');
-            alternate.disabled = false;
-        },
-        "rgb(255, 0, 0)"
-    );
-
-    new SRIStyleTest(
-        style_tests,
-        false,
-        "Same-origin with incorrect sha256 and sha512 hash, rel='alternate stylesheet' enabled",
-        {
-            href: "alternate.css?2",
-            title: "alt",
-            type: "text/css",
-            class: "alternate",
-            disabled: "disabled",
-            rel: "alternate stylesheet",
-            integrity: "sha256-fail83bWhnLig+d2VPKrRrTRyhqoDRo1ruGqZLZ0= sha512-failB7ktnzcb6h+kB9CUIuc8qvKIyLpygRJdQSEEycRy74dUsB+Yu9rSjpOPjRUblle8WWX9Gn7v39LK2Oceig==",
-        },
-        function (link, container) {
-            var alternate = document.querySelector('link.alternate');
-            alternate.disabled = false;
-        }
-    );
-
-    style_tests.execute();
-
-</script>
-<!--TODO check cache-poisoned resources, transfer-encoding, 3xx redirect
-   to resource with matching hash, and cross-origin leakage test as in sec5.3.
-   -->
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/subresource-integrity/subresource-integrity.sub.html
@@ -0,0 +1,545 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Subresource Integrity</title>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+
+<div id="log"></div>
+
+<div id="container"></div>
+<script>
+    // <script> tests
+    var xorigin_anon_script = location.protocol
+      + '//' + location.hostname + ':' + {{ports[http][1]}}
+      + '/subresource-integrity/crossorigin-anon-script.js';
+
+    var xorigin_creds_script = location.protocol
+      + '//' + location.hostname + ':' + {{ports[http][1]}}
+      + '/subresource-integrity/crossorigin-creds-script.js';
+
+    var xorigin_ineligible_script = location.protocol
+      + '//' + location.hostname + ':' + {{ports[http][1]}}
+      + '/subresource-integrity/crossorigin-ineligible-script.js';
+
+    var SRIScriptTest = function(pass, name, src, integrityValue, crossoriginValue) {
+        this.pass = pass;
+        this.name = "Script: " + name;
+        this.src = src;
+        this.integrityValue = integrityValue;
+        this.crossoriginValue = crossoriginValue;
+    }
+
+    SRIScriptTest.prototype.execute = function() {
+        var test = async_test(this.name);
+        var e = document.createElement("script");
+        e.src = this.src;
+        e.setAttribute("integrity", this.integrityValue);
+        if(this.crossoriginValue) {
+            e.setAttribute("crossorigin", this.crossoriginValue);
+        }
+        if(this.pass) {
+            e.addEventListener("load", function() {test.done()});
+            e.addEventListener("error", function() {
+                test.step(function(){ assert_unreached("Good load fired error handler.") })
+            });
+        } else {
+           e.addEventListener("load", function() {
+                test.step(function() { assert_unreached("Bad load succeeded.") })
+            });
+           e.addEventListener("error", function() {test.done()});
+        }
+        document.body.appendChild(e);
+    };
+
+    var xorigin_anon_style = location.protocol
+      + '//' + location.hostname + ':' + {{ports[http][1]}}
+      + '/subresource-integrity/crossorigin-anon-style.css';
+
+    var xorigin_creds_style = location.protocol
+      + '//' + location.hostname + ':' + {{ports[http][1]}}
+      + '/subresource-integrity/crossorigin-creds-style.css';
+
+    var xorigin_ineligible_style = location.protocol
+      + '//' + location.hostname + ':' + {{ports[http][1]}}
+      + '/subresource-integrity/crossorigin-ineligible-style.css';
+
+    // <link> tests
+    // Style tests must be done synchronously because they rely on the presence
+    // and absence of global style, which can affect later tests. Thus, instead
+    // of executing them one at a time, the style tests are implemented as a
+    // queue that builds up a list of tests, and then executes them one at a
+    // time.
+    var SRIStyleTest = function(queue, pass, name, attrs, customCallback, altPassValue) {
+        this.pass = pass;
+        this.name = "Style: " + name;
+        this.customCallback = customCallback || function () {};
+        this.attrs = attrs || {};
+        this.passValue = altPassValue || "rgb(255, 255, 0)";
+
+        this.test = async_test(this.name);
+
+        this.queue = queue;
+        this.queue.push(this);
+    }
+
+    SRIStyleTest.prototype.execute = function() {
+        var that = this;
+        var container = document.getElementById("container");
+        while (container.hasChildNodes()) {
+          container.removeChild(container.firstChild);
+        }
+
+        var test = this.test;
+
+        var div = document.createElement("div");
+        div.className = "testdiv";
+        var e = document.createElement("link");
+        this.attrs.rel = this.attrs.rel || "stylesheet";
+        for (var key in this.attrs) {
+            if (this.attrs.hasOwnProperty(key)) {
+                e.setAttribute(key, this.attrs[key]);
+            }
+        }
+
+        if(this.pass) {
+            e.addEventListener("load", function() {
+                test.step(function() {
+                    var background = window.getComputedStyle(div, null).getPropertyValue("background-color");
+                    assert_equals(background, that.passValue);
+                    test.done();
+                });
+            });
+            e.addEventListener("error", function() {
+                test.step(function(){ assert_unreached("Good load fired error handler.") })
+            });
+        } else {
+            e.addEventListener("load", function() {
+                 test.step(function() { assert_unreached("Bad load succeeded.") })
+             });
+            e.addEventListener("error", function() {
+                test.step(function() {
+                    var background = window.getComputedStyle(div, null).getPropertyValue("background-color");
+                    assert_not_equals(background, that.passValue);
+                    test.done();
+                });
+            });
+        }
+        container.appendChild(div);
+        container.appendChild(e);
+        this.customCallback(e, container);
+    };
+
+    var style_tests = [];
+    style_tests.execute = function() {
+        if (this.length > 0) {
+            this.shift().execute();
+        }
+    }
+    add_result_callback(function(res) {
+        if (res.name.startsWith("Style: ")) {
+          style_tests.execute();
+        }
+    });
+
+    // Script tests
+    new SRIScriptTest(
+        true,
+        "Same-origin with correct sha256 hash.",
+        "matching-digest.js",
+        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E="
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with correct sha384 hash.",
+        "matching-digest.js",
+        "sha384-BDRTPSywZFyxfLEAzaLcL4FfERBgJgXfEkuT0r04LG93Yqn1PWNYPZMomaqEfE3H"
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with correct sha512 hash.",
+        "matching-digest.js",
+        "sha512-geByvIIRspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg=="
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with empty integrity.",
+        "matching-digest.js",
+        ""
+    ).execute();
+
+    new SRIScriptTest(
+        false,
+        "Same-origin with incorrect hash.",
+        "non-matching-digest.js",
+        "sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with multiple sha256 hashes, including correct.",
+        "matching-digest.js",
+        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E= sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with multiple sha256 hashes, including unknown algorithm.",
+        "matching-digest.js",
+        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E= foo666-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with sha256 mismatch, sha512 match",
+        "matching-digest.js",
+        "sha512-geByvIIRspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg== sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+    ).execute();
+
+    new SRIScriptTest(
+        false,
+        "Same-origin with sha256 match, sha512 mismatch",
+        "matching-digest.js",
+        "sha512-deadbeefspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg== sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E="
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "<crossorigin='anonymous'> with correct hash, ACAO: *",
+        xorigin_anon_script,
+        "sha256-51AjITq701Y0yKSx3/UoIKtIY2UQ9+H8WGyyMuOWOC0=",
+        "anonymous"
+    ).execute();
+
+    new SRIScriptTest(
+        false,
+        "<crossorigin='anonymous'> with incorrect hash, ACAO: *",
+        xorigin_anon_script,
+        "sha256-deadbeefcSLlbFZCj1OACLxTxVck2TOrBTEdUbwz1yU=",
+        "anonymous"
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "<crossorigin='use-credentials'> with correct hash, CORS-eligible",
+        xorigin_creds_script,
+        "sha256-IaGApVboXPQxVSm2wVFmhMq1Yu37gWklajgMdxKLIvc=",
+        "use-credentials"
+    ).execute();
+
+    new SRIScriptTest(
+        false,
+        "<crossorigin='use-credentials'> with incorrect hash CORS-eligible",
+        xorigin_creds_script,
+        "sha256-deadbeef2S+pTRZgiw3DWrhC6JLDlt2zRyGpwH7unU8=",
+        "use-credentials"
+    ).execute();
+
+    new SRIScriptTest(
+        false,
+        "<crossorigin='anonymous'> with CORS-ineligible resource",
+        xorigin_ineligible_script,
+        "sha256-F5fXKTX7SiWjtgybxiBZIo2qhh2WiQnNx372E60XrOo=",
+        "anonymous"
+    ).execute();
+
+    new SRIScriptTest(
+        false,
+        "Cross-origin, not CORS request, with correct hash",
+        xorigin_anon_script,
+        "sha256-51AjITq701Y0yKSx3/UoIKtIY2UQ9+H8WGyyMuOWOC0="
+    ).execute();
+
+    new SRIScriptTest(
+        false,
+        "Cross-origin, not CORS request, with hash mismatch",
+        xorigin_anon_script,
+        "sha256-deadbeef01Y0yKSx3/UoIKtIY2UQ9+H8WGyyMuOWOC0="
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Cross-origin, empty integrity",
+        xorigin_anon_script,
+        ""
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with correct hash, options.",
+        "matching-digest.js",
+        "sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E=?foo=bar?spam=eggs"
+    ).execute();
+
+    new SRIScriptTest(
+        true,
+        "Same-origin with unknown algorithm only.",
+        "matching-digest.js",
+        "foo666-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E="
+    ).execute();
+
+    // Style tests
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with correct sha256 hash",
+        {
+            href: "style.css?1",
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with correct sha384 hash",
+        {
+            href: "style.css?2",
+            integrity: "sha384-wDAWxH4tOWBwAwHfBn9B7XuNmFxHTMeigAMwn0iVQ0zq3FtmYMLxihcGnU64CwcX"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with correct sha512 hash",
+        {
+            href: "style.css?3",
+            integrity: "sha512-9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2HSZX4l6w=="
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with empty integrity",
+        {
+            href: "style.css?4",
+            integrity: ""
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "Same-origin with incorrect hash.",
+        {
+            href: "style.css?5",
+            integrity: "sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with multiple sha256 hashes, including correct.",
+        {
+            href: "style.css?6",
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4= sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with multiple sha256 hashes, including unknown algorithm.",
+        {
+            href: "style.css?7",
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4= foo666-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with sha256 mismatch, sha512 match",
+        {
+            href: "style.css?8",
+            integrity: "sha512-9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2HSZX4l6w== sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "Same-origin with sha256 match, sha512 mismatch",
+        {
+            href: "style.css?9",
+            integrity: "sha512-deadbeef9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2== sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "<crossorigin='anonymous'> with correct hash, ACAO: *",
+        {
+            href: xorigin_anon_style + '?1',
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+            crossorigin: "anonymous"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "<crossorigin='anonymous'> with incorrect hash, ACAO: *",
+        {
+            href: xorigin_anon_style + '?2',
+            integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk=",
+            crossorigin: "anonymous"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "<crossorigin='use-credentials'> with correct hash, CORS-eligible",
+        {
+            href: xorigin_creds_style + '?1',
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+            crossorigin: "use-credentials"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "<crossorigin='use-credentials'> with incorrect hash CORS-eligible",
+        {
+            href: xorigin_creds_style + '?2',
+            integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk=",
+            crossorigin: "use-credentials"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "<crossorigin='anonymous'> with CORS-ineligible resource",
+        {
+            href: xorigin_ineligible_style + '?1',
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+            crossorigin: "anonymous"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "Cross-origin, not CORS request, with correct hash",
+        {
+            href: xorigin_anon_style + '?3',
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "Cross-origin, not CORS request, with hash mismatch",
+        {
+            href: xorigin_anon_style + '?4',
+            integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk="
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Cross-origin, empty integrity",
+        {
+            href: xorigin_anon_style + '?5',
+            integrity: ""
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with correct hash, options.",
+        {
+            href: "style.css?10",
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=?foo=bar?spam=eggs"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with unknown algorithm only.",
+        {
+            href: "style.css?11",
+            integrity: "foo666-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=?foo=bar?spam=eggs"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with correct sha256 hash, rel='stylesheet license'",
+        {
+            href: "style.css?12",
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+            rel: "stylesheet license"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with correct sha256 hash, rel='license stylesheet'",
+        {
+            href: "style.css?13",
+            integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+            rel: "license stylesheet"
+        }
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        true,
+        "Same-origin with correct sha256 and sha512 hash, rel='alternate stylesheet' enabled",
+        {
+            href: "alternate.css?1",
+            title: "alt",
+            type: "text/css",
+            class: "alternate",
+            disabled: "disabled",
+            rel: "alternate stylesheet",
+            integrity: "sha256-phbz83bWhnLig+d2VPKrRrTRyhqoDRo1ruGqZLZ0= sha512-8OYEB7ktnzcb6h+kB9CUIuc8qvKIyLpygRJdQSEEycRy74dUsB+Yu9rSjpOPjRUblle8WWX9Gn7v39LK2Oceig==",
+        },
+        function (link, container) {
+            var alternate = document.querySelector('link.alternate');
+            alternate.disabled = false;
+        },
+        "rgb(255, 0, 0)"
+    );
+
+    new SRIStyleTest(
+        style_tests,
+        false,
+        "Same-origin with incorrect sha256 and sha512 hash, rel='alternate stylesheet' enabled",
+        {
+            href: "alternate.css?2",
+            title: "alt",
+            type: "text/css",
+            class: "alternate",
+            disabled: "disabled",
+            rel: "alternate stylesheet",
+            integrity: "sha256-fail83bWhnLig+d2VPKrRrTRyhqoDRo1ruGqZLZ0= sha512-failB7ktnzcb6h+kB9CUIuc8qvKIyLpygRJdQSEEycRy74dUsB+Yu9rSjpOPjRUblle8WWX9Gn7v39LK2Oceig==",
+        },
+        function (link, container) {
+            var alternate = document.querySelector('link.alternate');
+            alternate.disabled = false;
+        }
+    );
+
+    style_tests.execute();
+
+</script>
+<!-- TODO check cache-poisoned resources, transfer-encoding, 3xx redirect
+   to resource with matching hash, and cross-origin leakage test as in sec5.3.
+    -->
--- a/testing/web-platform/tests/tools/manifest/sourcefile.py
+++ b/testing/web-platform/tests/tools/manifest/sourcefile.py
@@ -129,17 +129,17 @@ class SourceFile(object):
         ext = self.ext
 
         if not ext:
             return None
         if ext[0] == ".":
             ext = ext[1:]
         if ext in ["html", "htm"]:
             return "html"
-        if ext in ["xhtml", "xht"]:
+        if ext in ["xhtml", "xht", "xml"]:
             return "xhtml"
         if ext == "svg":
             return "svg"
         return None
 
     @cached_property
     def root(self):
         """Return an ElementTree Element for the root node of the file if it contains
--- a/testing/web-platform/tests/webstorage/idlharness.html
+++ b/testing/web-platform/tests/webstorage/idlharness.html
@@ -26,17 +26,17 @@ interface EventInit {
 };
 </pre>
 
 <pre id='idl'>
 interface Storage {
   readonly attribute unsigned long length;
   DOMString? key(unsigned long index);
   getter DOMString? getItem(DOMString key);
-  setter creator void setItem(DOMString key, DOMString value);
+  setter void setItem(DOMString key, DOMString value);
   deleter void removeItem(DOMString key);
   void clear();
 };
 [NoInterfaceObject]
 interface WindowSessionStorage {
   readonly attribute Storage sessionStorage;
 };
 Window implements WindowSessionStorage;
rename from testing/web-platform/tests/dom/collections/storage-supported-property-names.html
rename to testing/web-platform/tests/webstorage/storage_supported_property_names.html