Bug 920043 - Update DOM tests from web-platform-tests. a=test-only
authorMs2ger <ms2ger@gmail.com>
Wed, 25 Sep 2013 19:27:28 +0200
changeset 160608 53cb95cfe6dccea99f142771afaf81ed920f910a
parent 160607 9b349fca4874945f44910fbb75715fa77504e947
child 160609 647090a079020e22ec6a03060af68147eb794338
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs920043
milestone26.0a2
Bug 920043 - Update DOM tests from web-platform-tests. a=test-only
dom/imptests/failures/html/dom/Makefile.in
dom/imptests/failures/html/dom/collections/Makefile.in
dom/imptests/failures/html/dom/collections/moz.build
dom/imptests/failures/html/dom/collections/test_HTMLCollection-empty-name.html.json
dom/imptests/failures/html/dom/errors/Makefile.in
dom/imptests/failures/html/dom/errors/moz.build
dom/imptests/failures/html/dom/errors/test_exceptions.html.json
dom/imptests/failures/html/dom/moz.build
dom/imptests/failures/html/dom/nodes/Makefile.in
dom/imptests/failures/html/dom/nodes/moz.build
dom/imptests/failures/html/dom/nodes/test_Document-createElement-namespace.html.json
dom/imptests/failures/html/dom/nodes/test_Document-createElementNS.html.json
dom/imptests/failures/html/dom/nodes/test_Document-createEvent.html.json
dom/imptests/failures/html/dom/nodes/test_Document-getElementsByTagName.html.json
dom/imptests/failures/html/dom/nodes/test_Node-isEqualNode.xhtml.json
dom/imptests/failures/html/dom/nodes/test_Node-properties.html.json
dom/imptests/failures/html/dom/nodes/test_attributes.html.json
dom/imptests/failures/html/dom/nodes/test_case.html.json
dom/imptests/failures/html/dom/nodes/test_getElementsByClassName-10.xml.json
dom/imptests/failures/html/dom/nodes/test_getElementsByClassName-11.xml.json
dom/imptests/failures/html/dom/ranges/moz.build
dom/imptests/failures/html/dom/ranges/test_Range-cloneContents.html.json
dom/imptests/failures/html/dom/ranges/test_Range-cloneRange.html.json
dom/imptests/failures/html/dom/ranges/test_Range-collapse.html.json
dom/imptests/failures/html/dom/ranges/test_Range-commonAncestorContainer.html.json
dom/imptests/failures/html/dom/ranges/test_Range-compareBoundaryPoints.html.json
dom/imptests/failures/html/dom/ranges/test_Range-comparePoint.html.json
dom/imptests/failures/html/dom/ranges/test_Range-deleteContents.html.json
dom/imptests/failures/html/dom/ranges/test_Range-extractContents.html.json
dom/imptests/failures/html/dom/ranges/test_Range-intersectsNode.html.json
dom/imptests/failures/html/dom/ranges/test_Range-isPointInRange.html.json
dom/imptests/failures/html/dom/ranges/test_Range-set.html.json
dom/imptests/failures/html/dom/test_historical.html.json
dom/imptests/failures/html/dom/test_interfaces.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/Makefile.in
dom/imptests/failures/webapps/DOMCore/tests/approved/moz.build
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Node-properties.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-cloneContents.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-cloneRange.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-collapse.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-commonAncestorContainer.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-compareBoundaryPoints.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-comparePoint.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-deleteContents.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-extractContents.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-intersectsNode.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-isPointInRange.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-mutations.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-set.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_exceptions.html.json
dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/moz.build
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElementNS.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-replaceChild.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-intersectsNode.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_attributes.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_case.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_historical.html.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/Makefile.in
dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/moz.build
dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-10.xml.json
dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-11.xml.json
dom/imptests/html.mozbuild
dom/imptests/html.txt
dom/imptests/html/dom/Makefile.in
dom/imptests/html/dom/collections/Makefile.in
dom/imptests/html/dom/collections/moz.build
dom/imptests/html/dom/collections/test_HTMLCollection-empty-name.html
dom/imptests/html/dom/common.js
dom/imptests/html/dom/constants.js
dom/imptests/html/dom/errors/Makefile.in
dom/imptests/html/dom/errors/moz.build
dom/imptests/html/dom/errors/test_DOMException-constants.html
dom/imptests/html/dom/errors/test_exceptions.html
dom/imptests/html/dom/events/Makefile.in
dom/imptests/html/dom/events/moz.build
dom/imptests/html/dom/events/test_Event-constants.html
dom/imptests/html/dom/events/test_Event-constructors.html
dom/imptests/html/dom/events/test_Event-defaultPrevented.html
dom/imptests/html/dom/events/test_Event-initEvent.html
dom/imptests/html/dom/events/test_Event-propagation.html
dom/imptests/html/dom/events/test_Event-type.html
dom/imptests/html/dom/events/test_EventTarget-addEventListener.html
dom/imptests/html/dom/events/test_EventTarget-dispatchEvent.html
dom/imptests/html/dom/events/test_EventTarget-removeEventListener.html
dom/imptests/html/dom/events/test_ProgressEvent.html
dom/imptests/html/dom/moz.build
dom/imptests/html/dom/nodes/ChildNode-remove.js
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/Makefile.in
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/empty.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/empty.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/empty.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/empty.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/generate.py
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/moz.build
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/svg.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/svg.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/svg.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/svg.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.html
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.svg
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml
dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml
dom/imptests/html/dom/nodes/Document-createProcessingInstruction.js
dom/imptests/html/dom/nodes/Makefile.in
dom/imptests/html/dom/nodes/attributes.js
dom/imptests/html/dom/nodes/case.js
dom/imptests/html/dom/nodes/creators.js
dom/imptests/html/dom/nodes/encoding.php
dom/imptests/html/dom/nodes/moz.build
dom/imptests/html/dom/nodes/productions.js
dom/imptests/html/dom/nodes/test_CharacterData-appendData.html
dom/imptests/html/dom/nodes/test_CharacterData-deleteData.html
dom/imptests/html/dom/nodes/test_CharacterData-insertData.html
dom/imptests/html/dom/nodes/test_CharacterData-remove.html
dom/imptests/html/dom/nodes/test_CharacterData-replaceData.html
dom/imptests/html/dom/nodes/test_DOMImplementation-createDocument.html
dom/imptests/html/dom/nodes/test_DOMImplementation-createDocumentType.html
dom/imptests/html/dom/nodes/test_DOMImplementation-createHTMLDocument.html
dom/imptests/html/dom/nodes/test_DOMImplementation-hasFeature.html
dom/imptests/html/dom/nodes/test_Document-adoptNode.html
dom/imptests/html/dom/nodes/test_Document-createComment.html
dom/imptests/html/dom/nodes/test_Document-createElement-namespace.html
dom/imptests/html/dom/nodes/test_Document-createElement.html
dom/imptests/html/dom/nodes/test_Document-createElementNS.html
dom/imptests/html/dom/nodes/test_Document-createEvent.html
dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction-literal-1.xhtml
dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction-literal-2.xhtml
dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction.html
dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction.xhtml
dom/imptests/html/dom/nodes/test_Document-createTreeWalker.html
dom/imptests/html/dom/nodes/test_Document-getElementById.html
dom/imptests/html/dom/nodes/test_Document-getElementsByTagName.html
dom/imptests/html/dom/nodes/test_Document-getElementsByTagNameNS.html
dom/imptests/html/dom/nodes/test_Document-importNode.html
dom/imptests/html/dom/nodes/test_DocumentType-remove.html
dom/imptests/html/dom/nodes/test_Element-children.html
dom/imptests/html/dom/nodes/test_Element-getElementsByClassName.html
dom/imptests/html/dom/nodes/test_Element-remove.html
dom/imptests/html/dom/nodes/test_Element-removeAttributeNS.html
dom/imptests/html/dom/nodes/test_Element-tagName.html
dom/imptests/html/dom/nodes/test_Node-appendChild.html
dom/imptests/html/dom/nodes/test_Node-cloneNode.html
dom/imptests/html/dom/nodes/test_Node-compareDocumentPosition.html
dom/imptests/html/dom/nodes/test_Node-constants.html
dom/imptests/html/dom/nodes/test_Node-contains.html
dom/imptests/html/dom/nodes/test_Node-contains.xml
dom/imptests/html/dom/nodes/test_Node-insertBefore.html
dom/imptests/html/dom/nodes/test_Node-isEqualNode.xhtml
dom/imptests/html/dom/nodes/test_Node-lookupPrefix.xhtml
dom/imptests/html/dom/nodes/test_Node-nodeName.html
dom/imptests/html/dom/nodes/test_Node-nodeName.xhtml
dom/imptests/html/dom/nodes/test_Node-normalize.html
dom/imptests/html/dom/nodes/test_Node-parentElement.html
dom/imptests/html/dom/nodes/test_Node-parentNode.html
dom/imptests/html/dom/nodes/test_Node-properties.html
dom/imptests/html/dom/nodes/test_Node-removeChild.html
dom/imptests/html/dom/nodes/test_Node-replaceChild.html
dom/imptests/html/dom/nodes/test_attributes.html
dom/imptests/html/dom/nodes/test_case.html
dom/imptests/html/dom/nodes/test_getElementsByClassName-01.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-02.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-03.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-04.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-05.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-06.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-07.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-08.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-09.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-10.xml
dom/imptests/html/dom/nodes/test_getElementsByClassName-11.xml
dom/imptests/html/dom/nodes/test_getElementsByClassName-12.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-13.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-14.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-15.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-16.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-17.htm
dom/imptests/html/dom/nodes/test_getElementsByClassName-18.htm
dom/imptests/html/dom/ranges/Makefile.in
dom/imptests/html/dom/ranges/Range-test-iframe.html
dom/imptests/html/dom/ranges/moz.build
dom/imptests/html/dom/ranges/test_Range-attributes.html
dom/imptests/html/dom/ranges/test_Range-cloneContents.html
dom/imptests/html/dom/ranges/test_Range-cloneRange.html
dom/imptests/html/dom/ranges/test_Range-collapse.html
dom/imptests/html/dom/ranges/test_Range-commonAncestorContainer-2.html
dom/imptests/html/dom/ranges/test_Range-commonAncestorContainer.html
dom/imptests/html/dom/ranges/test_Range-compareBoundaryPoints.html
dom/imptests/html/dom/ranges/test_Range-comparePoint-2.html
dom/imptests/html/dom/ranges/test_Range-comparePoint.html
dom/imptests/html/dom/ranges/test_Range-deleteContents.html
dom/imptests/html/dom/ranges/test_Range-detach.html
dom/imptests/html/dom/ranges/test_Range-extractContents.html
dom/imptests/html/dom/ranges/test_Range-insertNode.html
dom/imptests/html/dom/ranges/test_Range-intersectsNode-binding.html
dom/imptests/html/dom/ranges/test_Range-intersectsNode.html
dom/imptests/html/dom/ranges/test_Range-isPointInRange.html
dom/imptests/html/dom/ranges/test_Range-mutations.html
dom/imptests/html/dom/ranges/test_Range-selectNode.html
dom/imptests/html/dom/ranges/test_Range-set.html
dom/imptests/html/dom/ranges/test_Range-surroundContents.html
dom/imptests/html/dom/test_historical.html
dom/imptests/html/dom/test_interface-objects.html
dom/imptests/html/dom/test_interfaces.html
dom/imptests/html/dom/traversal/Makefile.in
dom/imptests/html/dom/traversal/moz.build
dom/imptests/html/dom/traversal/test_NodeFilter-constants.html
dom/imptests/html/dom/traversal/unfinished/Makefile.in
dom/imptests/html/dom/traversal/unfinished/TODO
dom/imptests/html/dom/traversal/unfinished/moz.build
dom/imptests/moz.build
dom/imptests/webapps.mozbuild
dom/imptests/webapps.txt
dom/imptests/webapps/DOMCore/tests/approved/Makefile.in
dom/imptests/webapps/DOMCore/tests/approved/Range-test-iframe.html
dom/imptests/webapps/DOMCore/tests/approved/common.js
dom/imptests/webapps/DOMCore/tests/approved/moz.build
dom/imptests/webapps/DOMCore/tests/approved/test_Node-compareDocumentPosition.html
dom/imptests/webapps/DOMCore/tests/approved/test_Node-contains.html
dom/imptests/webapps/DOMCore/tests/approved/test_Node-properties.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneContents.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneRange.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-collapse.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-commonAncestorContainer.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-compareBoundaryPoints.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-comparePoint.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-deleteContents.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-extractContents.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-insertNode.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-intersectsNode.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-isPointInRange.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-mutations.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-selectNode.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-set.html
dom/imptests/webapps/DOMCore/tests/approved/test_Range-surroundContents.html
dom/imptests/webapps/DOMCore/tests/approved/test_exceptions.html
dom/imptests/webapps/DOMCore/tests/approved/test_interfaces.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/ChildNode-remove.js
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Document-createProcessingInstruction.js
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/attributes.js
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/case.js
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/constants.js
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/creators.js
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/moz.build
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/productions.js
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-appendData.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-deleteData.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-insertData.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-remove.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-replaceData.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMException-constants.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocumentType.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createHTMLDocument.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-hasFeature.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-adoptNode.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createComment.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElement.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElementNS.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createEvent.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction-literal-1.xhtml
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction-literal-2.xhtml
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction.xhtml
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createTreeWalker.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementById.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagNameNS.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-importNode.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DocumentType-remove.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-children.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-getElementsByClassName.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-remove.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-removeAttributeNS.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-tagName.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-constants.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-constructors.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-defaultPrevented.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-initEvent.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-type.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_EventTarget-dispatchEvent.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-appendChild.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-cloneNode.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-constants.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-contains.xml
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-insertBefore.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-lookupPrefix.xhtml
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-nodeName.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-nodeName.xhtml
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-normalize.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-parentElement.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-parentNode.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-removeChild.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-replaceChild.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-attributes.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-intersectsNode-binding.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_attributes.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_case.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_historical.html
dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_interfaces.html
dom/imptests/webapps/DOMCore/tests/submissions/Opera/Makefile.in
dom/imptests/webapps/DOMCore/tests/submissions/Opera/moz.build
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-01.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-02.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-03.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-04.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-05.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-06.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-07.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-08.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-09.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-10.xml
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-11.xml
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-12.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-13.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-14.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-15.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-16.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-17.htm
dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-18.htm
testing/mochitest/android.json
testing/mochitest/b2g.json
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/Makefile.in
@@ -0,0 +1,6 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_historical.html.json \
+  test_interfaces.html.json \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/collections/Makefile.in
@@ -0,0 +1,5 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_HTMLCollection-empty-name.html.json \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/collections/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/collections/test_HTMLCollection-empty-name.html.json
@@ -0,0 +1,9 @@
+{
+  "Empty string as a name for Document.getElementsByTagName": true,
+  "Empty string as a name for Element.getElementsByTagName": true,
+  "Empty string as a name for Document.getElementsByTagNameNS": true,
+  "Empty string as a name for Element.getElementsByTagNameNS": true,
+  "Empty string as a name for Document.getElementsByClassName": true,
+  "Empty string as a name for Element.getElementsByClassName": true,
+  "Empty string as a name for Element.children": true
+}
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/errors/Makefile.in
@@ -0,0 +1,5 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_exceptions.html.json \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/errors/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_exceptions.html.json
rename to dom/imptests/failures/html/dom/errors/test_exceptions.html.json
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/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/nodes/Makefile.in
@@ -0,0 +1,14 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_Document-createElement-namespace.html.json \
+  test_Document-createElementNS.html.json \
+  test_Document-createEvent.html.json \
+  test_Document-getElementsByTagName.html.json \
+  test_Node-isEqualNode.xhtml.json \
+  test_Node-properties.html.json \
+  test_attributes.html.json \
+  test_case.html.json \
+  test_getElementsByClassName-10.xml.json \
+  test_getElementsByClassName-11.xml.json \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/nodes/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/nodes/test_Document-createElement-namespace.html.json
@@ -0,0 +1,12 @@
+{
+  "Created element's namespace in empty.xml": true,
+  "Created element's namespace in xhtml.xml": true,
+  "Created element's namespace in svg.xml": true,
+  "Created element's namespace in mathml.xml": true,
+  "Created element's namespace in minimal_html.xml": true,
+  "Created element's namespace in xhtml_ns_removed.xml": true,
+  "Created element's namespace in xhtml_ns_changed.xml": true,
+  "Created element's namespace in bare_xhtml.xml": true,
+  "Created element's namespace in bare_svg.xml": true,
+  "Created element's namespace in bare_mathml.xml": true
+}
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElementNS.html.json
rename to dom/imptests/failures/html/dom/nodes/test_Document-createElementNS.html.json
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/nodes/test_Document-createEvent.html.json
@@ -0,0 +1,26 @@
+{
+  "createEvent('CustomEvent') should be initialized correctly.": true,
+  "createEvent('customevent') should be initialized correctly.": true,
+  "createEvent('CUSTOMEVENT') should be initialized correctly.": true,
+  "createEvent('Event') should be initialized correctly.": true,
+  "createEvent('event') should be initialized correctly.": true,
+  "createEvent('EVENT') should be initialized correctly.": true,
+  "createEvent('Events') should be initialized correctly.": true,
+  "createEvent('events') should be initialized correctly.": true,
+  "createEvent('EVENTS') should be initialized correctly.": true,
+  "createEvent('HTMLEvents') should be initialized correctly.": true,
+  "createEvent('htmlevents') should be initialized correctly.": true,
+  "createEvent('HTMLEVENTS') should be initialized correctly.": true,
+  "createEvent('MouseEvent') should be initialized correctly.": true,
+  "createEvent('mouseevent') should be initialized correctly.": true,
+  "createEvent('MOUSEEVENT') should be initialized correctly.": true,
+  "createEvent('MouseEvents') should be initialized correctly.": true,
+  "createEvent('mouseevents') should be initialized correctly.": true,
+  "createEvent('MOUSEEVENTS') should be initialized correctly.": true,
+  "createEvent('UIEvent') should be initialized correctly.": true,
+  "createEvent('uievent') should be initialized correctly.": true,
+  "createEvent('UIEVENT') should be initialized correctly.": true,
+  "createEvent('UIEvents') should be initialized correctly.": true,
+  "createEvent('uievents') should be initialized correctly.": true,
+  "createEvent('UIEVENTS') should be initialized correctly.": true
+}
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html.json
rename to dom/imptests/failures/html/dom/nodes/test_Document-getElementsByTagName.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml.json
rename to dom/imptests/failures/html/dom/nodes/test_Node-isEqualNode.xhtml.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Node-properties.html.json
rename to dom/imptests/failures/html/dom/nodes/test_Node-properties.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_attributes.html.json
rename to dom/imptests/failures/html/dom/nodes/test_attributes.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_case.html.json
rename to dom/imptests/failures/html/dom/nodes/test_case.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-10.xml.json
rename to dom/imptests/failures/html/dom/nodes/test_getElementsByClassName-10.xml.json
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-11.xml.json
rename to dom/imptests/failures/html/dom/nodes/test_getElementsByClassName-11.xml.json
new file mode 100644
--- /dev/null
+++ b/dom/imptests/failures/html/dom/ranges/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-cloneContents.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-cloneContents.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-cloneRange.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-cloneRange.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-collapse.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-collapse.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-commonAncestorContainer.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-commonAncestorContainer.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-compareBoundaryPoints.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-compareBoundaryPoints.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-comparePoint.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-comparePoint.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-deleteContents.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-deleteContents.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-extractContents.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-extractContents.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-intersectsNode.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-intersectsNode.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-isPointInRange.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-isPointInRange.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-set.html.json
rename to dom/imptests/failures/html/dom/ranges/test_Range-set.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_historical.html.json
rename to dom/imptests/failures/html/dom/test_historical.html.json
rename from dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json
rename to dom/imptests/failures/html/dom/test_interfaces.html.json
--- a/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json
+++ b/dom/imptests/failures/html/dom/test_interfaces.html.json
@@ -32,57 +32,63 @@
   "Event interface: document.createEvent(\"Event\") must have own property \"isTrusted\"": true,
   "Event interface: document.createEvent(\"Event\") must inherit property \"timeStamp\" with the proper type (15)": true,
   "Event interface: new Event(\"foo\") must have own property \"isTrusted\"": 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 have own property \"isTrusted\"": true,
   "Event interface: new CustomEvent(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": 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: attribute children": true,
   "Document interface: attribute firstElementChild": true,
   "Document interface: attribute lastElementChild": true,
   "Document interface: attribute childElementCount": true,
   "Document interface: operation prepend(union)": true,
   "Document interface: operation append(union)": true,
+  "XMLDocument interface: existence and properties of interface object": true,
   "Document interface: xmlDoc must inherit property \"children\" with the proper type (24)": true,
   "Document interface: xmlDoc must inherit property \"firstElementChild\" with the proper type (25)": true,
   "Document interface: xmlDoc must inherit property \"lastElementChild\" with the proper type (26)": true,
   "Document interface: xmlDoc must inherit property \"childElementCount\" with the proper type (27)": true,
   "Document interface: xmlDoc must inherit property \"prepend\" with the proper type (28)": true,
   "Document interface: calling prepend(union) 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(union) on xmlDoc with too few arguments must throw TypeError": true,
+  "DocumentFragment interface: existence and properties of interface object": true,
   "DocumentFragment interface: attribute children": true,
   "DocumentFragment interface: attribute firstElementChild": true,
   "DocumentFragment interface: attribute lastElementChild": true,
   "DocumentFragment interface: attribute childElementCount": true,
   "DocumentFragment interface: operation prepend(union)": true,
   "DocumentFragment interface: operation append(union)": true,
   "DocumentFragment interface: document.createDocumentFragment() must inherit property \"children\" with the proper type (0)": true,
   "DocumentFragment interface: document.createDocumentFragment() must inherit property \"firstElementChild\" with the proper type (1)": true,
   "DocumentFragment interface: document.createDocumentFragment() must inherit property \"lastElementChild\" with the proper type (2)": true,
   "DocumentFragment interface: document.createDocumentFragment() must inherit property \"childElementCount\" with the proper type (3)": true,
   "DocumentFragment interface: document.createDocumentFragment() must inherit property \"prepend\" with the proper type (4)": true,
   "DocumentFragment interface: calling prepend(union) 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(union) on document.createDocumentFragment() with too few arguments must throw TypeError": true,
+  "DocumentType interface: existence and properties of interface object": true,
   "DocumentType interface: attribute previousElementSibling": true,
   "DocumentType interface: attribute nextElementSibling": true,
   "DocumentType interface: operation before(union)": true,
   "DocumentType interface: operation after(union)": true,
   "DocumentType interface: operation replace(union)": true,
   "DocumentType interface: document.doctype must inherit property \"previousElementSibling\" with the proper type (3)": true,
   "DocumentType interface: document.doctype must inherit property \"nextElementSibling\" with the proper type (4)": true,
   "DocumentType interface: document.doctype must inherit property \"before\" with the proper type (5)": true,
   "DocumentType interface: calling before(union) on document.doctype with too few arguments must throw TypeError": true,
   "DocumentType interface: document.doctype must inherit property \"after\" with the proper type (6)": true,
   "DocumentType interface: calling after(union) on document.doctype with too few arguments must throw TypeError": true,
   "DocumentType interface: document.doctype must inherit property \"replace\" with the proper type (7)": true,
   "DocumentType interface: calling replace(union) on document.doctype with too few arguments must throw TypeError": true,
+  "Element interface: existence and properties of interface object": true,
   "Element interface: attribute namespaceURI": true,
   "Element interface: attribute prefix": true,
   "Element interface: attribute localName": true,
   "Element interface: attribute className": true,
   "Element interface: operation prepend(union)": true,
   "Element interface: operation append(union)": true,
   "Element interface: operation before(union)": true,
   "Element interface: operation after(union)": true,
@@ -93,53 +99,47 @@
   "Element interface: element must inherit property \"append\" with the proper type (24)": true,
   "Element interface: calling append(union) on element with too few arguments must throw TypeError": true,
   "Element interface: element must inherit property \"before\" with the proper type (27)": true,
   "Element interface: calling before(union) on element with too few arguments must throw TypeError": true,
   "Element interface: element must inherit property \"after\" with the proper type (28)": true,
   "Element interface: calling after(union) on element with too few arguments must throw TypeError": true,
   "Element interface: element must inherit property \"replace\" with the proper type (29)": true,
   "Element interface: calling replace(union) on element with too few arguments must throw TypeError": true,
+  "Attr interface: existence and properties of interface object": true,
   "Attr interface: existence and properties of interface prototype object": true,
+  "CharacterData interface: existence and properties of interface object": true,
   "CharacterData interface: attribute previousElementSibling": true,
   "CharacterData interface: attribute nextElementSibling": true,
   "CharacterData interface: operation before(union)": true,
   "CharacterData interface: operation after(union)": true,
   "CharacterData interface: operation replace(union)": true,
+  "Text interface: existence and properties of interface object": true,
   "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"previousElementSibling\" with the proper type (7)": true,
   "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"nextElementSibling\" with the proper type (8)": true,
   "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"before\" with the proper type (9)": true,
   "CharacterData interface: calling before(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true,
   "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"after\" with the proper type (10)": true,
   "CharacterData interface: calling after(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true,
   "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"replace\" with the proper type (11)": true,
   "CharacterData interface: calling replace(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true,
+  "ProcessingInstruction interface: existence and properties of interface object": true,
   "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"previousElementSibling\" with the proper type (7)": true,
   "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"nextElementSibling\" with the proper type (8)": true,
   "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"before\" with the proper type (9)": true,
   "CharacterData interface: calling before(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true,
   "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"after\" with the proper type (10)": true,
   "CharacterData interface: calling after(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true,
   "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"replace\" with the proper type (11)": true,
   "CharacterData interface: calling replace(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true,
+  "Comment interface: existence and properties of interface object": true,
   "CharacterData interface: document.createComment(\"abc\") must inherit property \"previousElementSibling\" with the proper type (7)": true,
   "CharacterData interface: document.createComment(\"abc\") must inherit property \"nextElementSibling\" with the proper type (8)": true,
   "CharacterData interface: document.createComment(\"abc\") must inherit property \"before\" with the proper type (9)": true,
   "CharacterData interface: calling before(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true,
   "CharacterData interface: document.createComment(\"abc\") must inherit property \"after\" with the proper type (10)": true,
   "CharacterData interface: calling after(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true,
   "CharacterData interface: document.createComment(\"abc\") must inherit property \"replace\" with the proper type (11)": true,
   "CharacterData interface: calling replace(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true,
-  "Node interface: existence and properties of interface object": true,
-  "Document interface: existence and properties of interface object": true,
-  "XMLDocument interface: existence and properties of interface object": true,
-  "DocumentFragment interface: existence and properties of interface object": true,
-  "DocumentType interface: existence and properties of interface object": true,
-  "Element interface: existence and properties of interface object": true,
-  "Attr interface: existence and properties of interface object": true,
-  "CharacterData interface: existence and properties of interface object": true,
-  "Text interface: existence and properties of interface object": true,
-  "ProcessingInstruction interface: existence and properties of interface object": true,
-  "Comment interface: existence and properties of interface object": true,
-  "DOMSettableTokenList interface: existence and properties of interface object": true,
   "NodeFilter interface: existence and properties of interface object": true,
-  "NodeList interface: existence and properties of interface prototype object": true
+  "NodeList interface: existence and properties of interface prototype object": true,
+  "DOMSettableTokenList interface: existence and properties of interface object": true
 }
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/approved/Makefile.in
+++ /dev/null
@@ -1,18 +0,0 @@
-# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
-
-MOCHITEST_FILES := \
-  test_Node-properties.html.json \
-  test_Range-cloneContents.html.json \
-  test_Range-cloneRange.html.json \
-  test_Range-collapse.html.json \
-  test_Range-commonAncestorContainer.html.json \
-  test_Range-compareBoundaryPoints.html.json \
-  test_Range-comparePoint.html.json \
-  test_Range-deleteContents.html.json \
-  test_Range-extractContents.html.json \
-  test_Range-intersectsNode.html.json \
-  test_Range-isPointInRange.html.json \
-  test_Range-set.html.json \
-  test_exceptions.html.json \
-  test_interfaces.html.json \
-  $(NULL)
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/approved/moz.build
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
-
-DIRS += [
-]
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/approved/test_Range-mutations.html.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "paras[0].firstChild.splitText(1), with unselected range on paras[0] from 0 to 1": true,
-  "paras[0].firstChild.splitText(1), with selected range on paras[0] from 0 to 1": true,
-  "paras[0].firstChild.splitText(1), with unselected range collapsed at (paras[0], 1)": true,
-  "paras[0].firstChild.splitText(1), with selected range collapsed at (paras[0], 1)": true,
-  "paras[0].firstChild.splitText(1), with unselected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
-  "paras[0].firstChild.splitText(1), with selected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
-  "paras[0].firstChild.splitText(2), with unselected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
-  "paras[0].firstChild.splitText(2), with selected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
-  "paras[0].firstChild.splitText(3), with unselected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
-  "paras[0].firstChild.splitText(3), with selected range from (paras[0].firstChild, 1) to (paras[0], 1)": true
-}
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in
+++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in
@@ -1,10 +0,0 @@
-# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
-
-MOCHITEST_FILES := \
-  test_Document-createElementNS.html.json \
-  test_Document-getElementsByTagName.html.json \
-  test_Node-isEqualNode.xhtml.json \
-  test_attributes.html.json \
-  test_case.html.json \
-  test_historical.html.json \
-  $(NULL)
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/moz.build
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
-
-DIRS += [
-]
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "createDocument test 91: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true,
-  "createDocument test 92: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true,
-  "createDocument test 94: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true
-}
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-replaceChild.html.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "If the context node is not a node that can contain children, a NotFoundError exception should be thrown": true
-}
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "Constants for acceptNode on NodeFilter prototype object.": true,
-  "Constants for whatToShow on NodeFilter prototype object.": true
-}
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-intersectsNode.html.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "Range.intersectsNode": true,
-  "Range.intersectsNode 1": true,
-  "Range.intersectsNode 2": true
-}
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/Makefile.in
+++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/Makefile.in
@@ -1,6 +0,0 @@
-# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
-
-MOCHITEST_FILES := \
-  test_getElementsByClassName-10.xml.json \
-  test_getElementsByClassName-11.xml.json \
-  $(NULL)
deleted file mode 100644
--- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Opera/moz.build
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
-
-DIRS += [
-]
--- a/dom/imptests/html.mozbuild
+++ b/dom/imptests/html.mozbuild
@@ -1,11 +1,20 @@
 # THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
 
 DIRS += [
+    'html/dom',
+    'html/dom/collections',
+    'html/dom/errors',
+    'html/dom/events',
+    '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',
     'html/html/browsers/the-window-object/named-access-on-the-window-object',
     'html/html/dom/documents/dta',
     'html/html/dom/documents/dta/doc.gEBN',
     'html/html/dom/elements/global-attributes',
     'html/html/editing/the-hidden-attribute',
--- a/dom/imptests/html.txt
+++ b/dom/imptests/html.txt
@@ -1,9 +1,10 @@
 git|git://github.com/w3c/web-platform-tests.git|html
+dom
 domxpath
 html/browsers/browsing-the-web/read-media
 html/browsers/the-window-object
 html/dom/documents/dom-tree-accessors
 html/dom/elements/global-attributes
 html/editing/the-hidden-attribute
 html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis
 html/semantics/document-metadata/the-title-element
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/Makefile.in
@@ -0,0 +1,9 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_historical.html \
+  test_interface-objects.html \
+  test_interfaces.html \
+  common.js \
+  constants.js \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/collections/Makefile.in
@@ -0,0 +1,5 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_HTMLCollection-empty-name.html \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/collections/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/collections/test_HTMLCollection-empty-name.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>HTMLCollection and empty names</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id=log></div>
+<div id=test>
+<div class=a id></div>
+<div class=a name></div>
+<a class=a name></a>
+</div>
+<script>
+test(function() {
+  var c = document.getElementsByTagName("*");
+  assert_false("" in c, "Empty string should not be in the collection.");
+  assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
+  assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
+}, "Empty string as a name for Document.getElementsByTagName");
+
+test(function() {
+  var div = document.getElementById("test");
+  var c = div.getElementsByTagName("*");
+  assert_false("" in c, "Empty string should not be in the collection.");
+  assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
+  assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
+}, "Empty string as a name for Element.getElementsByTagName");
+
+test(function() {
+  var c = document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "a");
+  assert_false("" in c, "Empty string should not be in the collection.");
+  assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
+  assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
+}, "Empty string as a name for Document.getElementsByTagNameNS");
+
+test(function() {
+  var div = document.getElementById("test");
+  var c = div.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "a");
+  assert_false("" in c, "Empty string should not be in the collection.");
+  assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
+  assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
+}, "Empty string as a name for Element.getElementsByTagNameNS");
+
+test(function() {
+  var c = document.getElementsByClassName("a");
+  assert_false("" in c, "Empty string should not be in the collection.");
+  assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
+  assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
+}, "Empty string as a name for Document.getElementsByClassName");
+
+test(function() {
+  var div = document.getElementById("test");
+  var c = div.getElementsByClassName("a");
+  assert_false("" in c, "Empty string should not be in the collection.");
+  assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
+  assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
+}, "Empty string as a name for Element.getElementsByClassName");
+
+test(function() {
+  var div = document.getElementById("test");
+  var c = div.children;
+  assert_false("" in c, "Empty string should not be in the collection.");
+  assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
+  assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
+}, "Empty string as a name for Element.children");
+</script>
rename from dom/imptests/webapps/DOMCore/tests/approved/common.js
rename to dom/imptests/html/dom/common.js
--- a/dom/imptests/webapps/DOMCore/tests/approved/common.js
+++ b/dom/imptests/html/dom/common.js
@@ -9,17 +9,17 @@ var selection;
 var testDiv, paras, detachedDiv, detachedPara1, detachedPara2,
 	foreignDoc, foreignPara1, foreignPara2, xmlDoc, xmlElement,
 	detachedXmlElement, detachedTextNode, foreignTextNode,
 	detachedForeignTextNode, xmlTextNode, detachedXmlTextNode,
 	processingInstruction, detachedProcessingInstruction, comment,
 	detachedComment, foreignComment, detachedForeignComment, xmlComment,
 	detachedXmlComment, docfrag, foreignDocfrag, xmlDocfrag, doctype,
 	foreignDoctype, xmlDoctype;
-var testRanges, testPoints, testNodes;
+var testRangesShort, testRanges, testPoints, testNodesShort, testNodes;
 
 function setupRangeTests() {
 	selection = getSelection();
 	testDiv = document.querySelector("#test");
 	if (testDiv) {
 		testDiv.parentNode.removeChild(testDiv);
 	}
 	testDiv = document.createElement("div");
@@ -116,85 +116,86 @@ function setupRangeTests() {
 	foreignComment = foreignDoc.createComment('"Commenter" and "commentator" mean different things.  I\'ve seen non-native speakers trip up on this.');
 	foreignDoc.appendChild(foreignComment);
 	foreignTextNode = foreignDoc.createTextNode("I admit that I harbor doubts about whether we really need so many things to test, but it's too late to stop now.");
 	foreignDoc.body.appendChild(foreignTextNode);
 
 	doctype = document.doctype;
 	foreignDoctype = foreignDoc.doctype;
 
-	testRanges = [
+	testRangesShort = [
 		// Various ranges within the text node children of different
 		// paragraphs.  All should be valid.
 		"[paras[0].firstChild, 0, paras[0].firstChild, 0]",
 		"[paras[0].firstChild, 0, paras[0].firstChild, 1]",
 		"[paras[0].firstChild, 2, paras[0].firstChild, 8]",
 		"[paras[0].firstChild, 2, paras[0].firstChild, 9]",
 		"[paras[1].firstChild, 0, paras[1].firstChild, 0]",
-		"[paras[1].firstChild, 0, paras[1].firstChild, 1]",
-		"[paras[1].firstChild, 2, paras[1].firstChild, 8]",
 		"[paras[1].firstChild, 2, paras[1].firstChild, 9]",
 		"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 0]",
-		"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 1]",
 		"[detachedPara1.firstChild, 2, detachedPara1.firstChild, 8]",
 		"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 0]",
-		"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 1]",
 		"[foreignPara1.firstChild, 2, foreignPara1.firstChild, 8]",
 		// Now try testing some elements, not just text nodes.
 		"[document.documentElement, 0, document.documentElement, 1]",
 		"[document.documentElement, 0, document.documentElement, 2]",
 		"[document.documentElement, 1, document.documentElement, 2]",
 		"[document.head, 1, document.head, 1]",
 		"[document.body, 4, document.body, 5]",
 		"[foreignDoc.documentElement, 0, foreignDoc.documentElement, 1]",
-		"[foreignDoc.head, 1, foreignDoc.head, 1]",
-		"[foreignDoc.body, 0, foreignDoc.body, 0]",
-		"[paras[0], 0, paras[0], 0]",
 		"[paras[0], 0, paras[0], 1]",
-		"[detachedPara1, 0, detachedPara1, 0]",
 		"[detachedPara1, 0, detachedPara1, 1]",
 		// Now try some ranges that span elements.
 		"[paras[0].firstChild, 0, paras[1].firstChild, 0]",
 		"[paras[0].firstChild, 0, paras[1].firstChild, 8]",
 		"[paras[0].firstChild, 3, paras[3], 1]",
 		// How about something that spans a node and its descendant?
 		"[paras[0], 0, paras[0].firstChild, 7]",
 		"[testDiv, 2, paras[4], 1]",
+		// Then a few more interesting things just for good measure.
+		"[document, 0, document, 1]",
+		"[document, 0, document, 2]",
+		"[comment, 2, comment, 3]",
+		"[testDiv, 0, comment, 5]",
+		"[foreignDoc, 1, foreignComment, 2]",
+		"[foreignDoc.body, 0, foreignTextNode, 36]",
+		"[xmlDoc, 1, xmlComment, 0]",
+		"[detachedTextNode, 0, detachedTextNode, 8]",
+		"[detachedForeignTextNode, 0, detachedForeignTextNode, 8]",
+		"[detachedXmlTextNode, 0, detachedXmlTextNode, 8]",
+		"[detachedComment, 3, detachedComment, 4]",
+		"[detachedForeignComment, 0, detachedForeignComment, 1]",
+		"[detachedXmlComment, 2, detachedXmlComment, 6]",
+		"[docfrag, 0, docfrag, 0]",
+	];
+
+	testRanges = testRangesShort.concat([
+		"[paras[1].firstChild, 0, paras[1].firstChild, 1]",
+		"[paras[1].firstChild, 2, paras[1].firstChild, 8]",
+		"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 1]",
+		"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 1]",
+		"[foreignDoc.head, 1, foreignDoc.head, 1]",
+		"[foreignDoc.body, 0, foreignDoc.body, 0]",
+		"[paras[0], 0, paras[0], 0]",
+		"[detachedPara1, 0, detachedPara1, 0]",
 		"[testDiv, 1, paras[2].firstChild, 5]",
 		"[document.documentElement, 1, document.body, 0]",
 		"[foreignDoc.documentElement, 1, foreignDoc.body, 0]",
-		// Then a few more interesting things just for good measure.
-		"[document, 0, document, 1]",
-		"[document, 0, document, 2]",
 		"[document, 1, document, 2]",
-		"[comment, 2, comment, 3]",
-		"[testDiv, 0, comment, 5]",
 		"[paras[2].firstChild, 4, comment, 2]",
 		"[paras[3], 1, comment, 8]",
 		"[foreignDoc, 0, foreignDoc, 0]",
-		"[foreignDoc, 1, foreignComment, 2]",
-		"[foreignDoc.body, 0, foreignTextNode, 36]",
 		"[xmlDoc, 0, xmlDoc, 0]",
-		// Opera 11 crashes if you extractContents() a range that ends at offset
-		// zero in a comment.  Comment out this line to run the tests successfully.
-		"[xmlDoc, 1, xmlComment, 0]",
-		"[detachedTextNode, 0, detachedTextNode, 8]",
 		"[detachedForeignTextNode, 7, detachedForeignTextNode, 7]",
-		"[detachedForeignTextNode, 0, detachedForeignTextNode, 8]",
 		"[detachedXmlTextNode, 7, detachedXmlTextNode, 7]",
-		"[detachedXmlTextNode, 0, detachedXmlTextNode, 8]",
-		"[detachedComment, 3, detachedComment, 4]",
 		"[detachedComment, 5, detachedComment, 5]",
-		"[detachedForeignComment, 0, detachedForeignComment, 1]",
 		"[detachedForeignComment, 4, detachedForeignComment, 4]",
-		"[detachedXmlComment, 2, detachedXmlComment, 6]",
-		"[docfrag, 0, docfrag, 0]",
 		"[foreignDocfrag, 0, foreignDocfrag, 0]",
 		"[xmlDocfrag, 0, xmlDocfrag, 0]",
-	];
+	]);
 
 	testPoints = [
 		// Various positions within the page, some invalid.  Remember that
 		// paras[0] is visible, and paras[1] is display: none.
 		"[paras[0].firstChild, -1]",
 		"[paras[0].firstChild, 0]",
 		"[paras[0].firstChild, 1]",
 		"[paras[0].firstChild, 2]",
@@ -281,55 +282,58 @@ function setupRangeTests() {
 		"[xmlDocfrag, 0]",
 		"[doctype, 0]",
 		"[doctype, -17]",
 		"[doctype, 1]",
 		"[foreignDoctype, 0]",
 		"[xmlDoctype, 0]",
 	];
 
-	testNodes = [
+	testNodesShort = [
 		"paras[0]",
 		"paras[0].firstChild",
-		"paras[1]",
 		"paras[1].firstChild",
 		"foreignPara1",
 		"foreignPara1.firstChild",
 		"detachedPara1",
 		"detachedPara1.firstChild",
-		"detachedPara2",
-		"detachedPara2.firstChild",
-		"testDiv",
 		"document",
 		"detachedDiv",
 		"foreignDoc",
 		"foreignPara2",
 		"xmlDoc",
 		"xmlElement",
-		"detachedXmlElement",
 		"detachedTextNode",
 		"foreignTextNode",
-		"detachedForeignTextNode",
-		"xmlTextNode",
-		"detachedXmlTextNode",
 		"processingInstruction",
 		"detachedProcessingInstruction",
 		"comment",
 		"detachedComment",
+		"docfrag",
+		"doctype",
+		"foreignDoctype",
+	];
+
+	testNodes = testNodesShort.concat([
+		"paras[1]",
+		"detachedPara2",
+		"detachedPara2.firstChild",
+		"testDiv",
+		"detachedXmlElement",
+		"detachedForeignTextNode",
+		"xmlTextNode",
+		"detachedXmlTextNode",
+		"xmlComment",
 		"foreignComment",
 		"detachedForeignComment",
-		"xmlComment",
 		"detachedXmlComment",
-		"docfrag",
 		"foreignDocfrag",
 		"xmlDocfrag",
-		"doctype",
-		"foreignDoctype",
 		"xmlDoctype",
-	];
+	]);
 }
 if ("setup" in window) {
 	setup(setupRangeTests);
 } else {
 	// Presumably we're running from within an iframe or something
 	setupRangeTests();
 }
 
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/constants.js
rename to dom/imptests/html/dom/constants.js
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/errors/Makefile.in
@@ -0,0 +1,6 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_DOMException-constants.html \
+  test_exceptions.html \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/errors/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMException-constants.html
rename to dom/imptests/html/dom/errors/test_DOMException-constants.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_exceptions.html
rename to dom/imptests/html/dom/errors/test_exceptions.html
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/events/Makefile.in
@@ -0,0 +1,14 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_Event-constants.html \
+  test_Event-constructors.html \
+  test_Event-defaultPrevented.html \
+  test_Event-initEvent.html \
+  test_Event-propagation.html \
+  test_EventTarget-addEventListener.html \
+  test_EventTarget-dispatchEvent.html \
+  test_EventTarget-removeEventListener.html \
+  test_Event-type.html \
+  test_ProgressEvent.html \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/events/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-constants.html
rename to dom/imptests/html/dom/events/test_Event-constants.html
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-constants.html
+++ b/dom/imptests/html/dom/events/test_Event-constants.html
@@ -1,13 +1,13 @@
 <!doctype html>
 <title>Event constants</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
-<script src="constants.js"></script>
+<script src="../constants.js"></script>
 <div id="log"></div>
 <script>
 var objects = [
   [Event, "Event interface object"],
   [Event.prototype, "Event prototype object"],
   [document.createEvent("Event"), "Event object"],
   [document.createEvent("CustomEvent"), "CustomEvent object"]
 ]
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-constructors.html
rename to dom/imptests/html/dom/events/test_Event-constructors.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-defaultPrevented.html
rename to dom/imptests/html/dom/events/test_Event-defaultPrevented.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-initEvent.html
rename to dom/imptests/html/dom/events/test_Event-initEvent.html
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/events/test_Event-propagation.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<title>Event propagation tests</title>
+<link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
+<div id=log></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+function testPropagationFlag(ev, expected, desc) {
+	test(function() {
+		var called = false;
+		var callback = function() { called = true };
+		document.head.addEventListener("foo", callback);
+		document.head.dispatchEvent(ev);
+		assert_equals(called, expected, "Propagation flag");
+		document.head.removeEventListener("foo", callback);
+	}, desc);
+}
+
+var ev = document.createEvent("Event");
+ev.initEvent("foo", true, false);
+testPropagationFlag(ev, true, "Newly-created Event");
+ev.stopPropagation();
+testPropagationFlag(ev, false, "After stopPropagation()");
+ev.initEvent("foo", true, false);
+testPropagationFlag(ev, true, "Reinitialized after stopPropagation()");
+
+var ev = document.createEvent("Event");
+ev.initEvent("foo", true, false);
+ev.stopImmediatePropagation();
+testPropagationFlag(ev, false, "After stopImmediatePropagation()");
+ev.initEvent("foo", true, false);
+testPropagationFlag(ev, true, "Reinitialized after stopImmediatePropagation()");
+</script>
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-type.html
rename to dom/imptests/html/dom/events/test_Event-type.html
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/events/test_EventTarget-addEventListener.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>EventTarget.addEventListener</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
+<link rel="help" href="http://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+// Step 1.
+test(function() {
+  assert_equals(document.addEventListener("x", null, false), undefined);
+  assert_equals(document.addEventListener("x", null, true), undefined);
+  assert_equals(document.addEventListener("x", null), undefined);
+}, "Adding a null event listener should succeed");
+</script>
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_EventTarget-dispatchEvent.html
rename to dom/imptests/html/dom/events/test_EventTarget-dispatchEvent.html
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/events/test_EventTarget-removeEventListener.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>EventTarget.removeEventListener</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
+<link rel="help" href="http://dom.spec.whatwg.org/#dom-eventtarget-removeeventlistener">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+// Step 1.
+test(function() {
+  assert_equals(document.removeEventListener("x", null, false), undefined);
+  assert_equals(document.removeEventListener("x", null, true), undefined);
+  assert_equals(document.removeEventListener("x", null), undefined);
+}, "removing a null event listener should succeed");
+</script>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/events/test_ProgressEvent.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<title>ProgressEvent constructor</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id=log></div>
+<script>
+test(function() {
+  var ev = new ProgressEvent("test")
+  assert_equals(ev.type, "test")
+  assert_equals(ev.target, null)
+  assert_equals(ev.currentTarget, null)
+  assert_equals(ev.eventPhase, Event.NONE)
+  assert_equals(ev.bubbles, false)
+  assert_equals(ev.cancelable, false)
+  assert_equals(ev.defaultPrevented, false)
+  assert_equals(ev.isTrusted, false)
+  assert_true(ev.timeStamp > 0)
+  assert_true("initEvent" in ev)
+}, "Default event values.")
+test(function() {
+  assert_throws("NotSupportedError", function() {
+    document.createEvent("ProgressEvent")
+  })
+}, "document.createEvent() should not work with ProgressEvent.")
+</script>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/ChildNode-remove.js
rename to dom/imptests/html/dom/nodes/ChildNode-remove.js
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/Makefile.in
@@ -0,0 +1,45 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  bare_mathml.html \
+  bare_mathml.svg \
+  bare_mathml.xhtml \
+  bare_mathml.xml \
+  bare_svg.html \
+  bare_svg.svg \
+  bare_svg.xhtml \
+  bare_svg.xml \
+  bare_xhtml.html \
+  bare_xhtml.svg \
+  bare_xhtml.xhtml \
+  bare_xhtml.xml \
+  empty.html \
+  empty.svg \
+  empty.xhtml \
+  empty.xml \
+  generate.py \
+  mathml.html \
+  mathml.svg \
+  mathml.xhtml \
+  mathml.xml \
+  minimal_html.html \
+  minimal_html.svg \
+  minimal_html.xhtml \
+  minimal_html.xml \
+  svg.html \
+  svg.svg \
+  svg.xhtml \
+  svg.xml \
+  xhtml.html \
+  xhtml_ns_changed.html \
+  xhtml_ns_changed.svg \
+  xhtml_ns_changed.xhtml \
+  xhtml_ns_changed.xml \
+  xhtml_ns_removed.html \
+  xhtml_ns_removed.svg \
+  xhtml_ns_removed.xhtml \
+  xhtml_ns_removed.xml \
+  xhtml.svg \
+  xhtml.xhtml \
+  xhtml.xml \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.html
@@ -0,0 +1,1 @@
+<math></math>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.svg
@@ -0,0 +1,1 @@
+<math></math>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xhtml
@@ -0,0 +1,1 @@
+<math></math>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xml
@@ -0,0 +1,1 @@
+<math></math>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.html
@@ -0,0 +1,1 @@
+<svg></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.svg
@@ -0,0 +1,1 @@
+<svg></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.xhtml
@@ -0,0 +1,1 @@
+<svg></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_svg.xml
@@ -0,0 +1,1 @@
+<svg></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.html
@@ -0,0 +1,1 @@
+<html></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.svg
@@ -0,0 +1,1 @@
+<html></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xhtml
@@ -0,0 +1,1 @@
+<html></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xml
@@ -0,0 +1,1 @@
+<html></html>
\ No newline at end of file
new file mode 100644
new file mode 100644
new file mode 100644
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/generate.py
@@ -0,0 +1,77 @@
+#!/usr/bin/python
+import os
+import sys
+
+THIS_NAME = "generate.py"
+
+# Note: these lists must be kept in sync with the lists in
+# Document-createElement-namespace.html, and this script must be run whenever
+# the lists are updated.  (We could keep the lists in a shared JSON file, but
+# seems like too much effort.)
+FILES = (
+    ("empty", ""),
+    ("minimal_html", "<!doctype html><title></title>"),
+
+    ("xhtml", '<html xmlns="http://www.w3.org/1999/xhtml"></html>'),
+    ("svg", '<svg xmlns="http://www.w3.org/2000/svg"></svg>'),
+    ("mathml", '<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>'),
+
+    ("bare_xhtml", "<html></html>"),
+    ("bare_svg", "<svg></svg>"),
+    ("bare_mathml", "<math></math>"),
+
+    ("xhtml_ns_removed", """\
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS(null, "html");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
+"""),
+    ("xhtml_ns_changed", """\
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
+"""),
+)
+
+EXTENSIONS = (
+    "html",
+    "xhtml",
+    "xml",
+    "svg",
+    # Was not able to get server MIME type working properly :(
+    #"mml",
+)
+
+def __main__():
+    if len(sys.argv) > 1:
+        print "No arguments expected, aborting"
+        return
+
+    if not os.access(THIS_NAME, os.F_OK):
+        print "Must be run from the directory of " + THIS_NAME + ", aborting"
+        return
+
+    for name in os.listdir("."):
+        if name == THIS_NAME:
+            continue
+        os.remove(name)
+
+    manifest = open("MANIFEST", "w")
+
+    for name, contents in FILES:
+        for extension in EXTENSIONS:
+            f = open(name + "." + extension, "w")
+            f.write(contents)
+            f.close()
+            manifest.write("support " + name + "." + extension + "\n")
+
+    manifest.close()
+
+__main__()
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.html
@@ -0,0 +1,1 @@
+<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.svg
@@ -0,0 +1,1 @@
+<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.xhtml
@@ -0,0 +1,1 @@
+<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/mathml.xml
@@ -0,0 +1,1 @@
+<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.html
@@ -0,0 +1,1 @@
+<!doctype html><title></title>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.svg
@@ -0,0 +1,1 @@
+<!doctype html><title></title>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml
@@ -0,0 +1,1 @@
+<!doctype html><title></title>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/minimal_html.xml
@@ -0,0 +1,1 @@
+<!doctype html><title></title>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/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/nodes/Document-createElement-namespace-tests/svg.html
@@ -0,0 +1,1 @@
+<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/svg.svg
@@ -0,0 +1,1 @@
+<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/svg.xhtml
@@ -0,0 +1,1 @@
+<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/svg.xml
@@ -0,0 +1,1 @@
+<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.html
@@ -0,0 +1,1 @@
+<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.svg
@@ -0,0 +1,1 @@
+<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.xhtml
@@ -0,0 +1,1 @@
+<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml.xml
@@ -0,0 +1,1 @@
+<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.html
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.svg
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.html
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS(null, "html");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.svg
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS(null, "html");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS(null, "html");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head><script>
+    var newRoot = document.createElementNS(null, "html");
+    document.removeChild(document.documentElement);
+    document.appendChild(newRoot);
+  </script></head>
+</html>
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Document-createProcessingInstruction.js
rename to dom/imptests/html/dom/nodes/Document-createProcessingInstruction.js
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/Makefile.in
@@ -0,0 +1,78 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_attributes.html \
+  test_case.html \
+  test_CharacterData-appendData.html \
+  test_CharacterData-deleteData.html \
+  test_CharacterData-insertData.html \
+  test_CharacterData-remove.html \
+  test_CharacterData-replaceData.html \
+  test_Document-adoptNode.html \
+  test_Document-createComment.html \
+  test_Document-createElement.html \
+  test_Document-createElement-namespace.html \
+  test_Document-createElementNS.html \
+  test_Document-createEvent.html \
+  test_Document-createProcessingInstruction.html \
+  test_Document-createProcessingInstruction-literal-1.xhtml \
+  test_Document-createProcessingInstruction-literal-2.xhtml \
+  test_Document-createProcessingInstruction.xhtml \
+  test_Document-createTreeWalker.html \
+  test_Document-getElementById.html \
+  test_Document-getElementsByTagName.html \
+  test_Document-getElementsByTagNameNS.html \
+  test_Document-importNode.html \
+  test_DocumentType-remove.html \
+  test_DOMImplementation-createDocument.html \
+  test_DOMImplementation-createDocumentType.html \
+  test_DOMImplementation-createHTMLDocument.html \
+  test_DOMImplementation-hasFeature.html \
+  test_Element-children.html \
+  test_Element-getElementsByClassName.html \
+  test_Element-removeAttributeNS.html \
+  test_Element-remove.html \
+  test_Element-tagName.html \
+  test_getElementsByClassName-01.htm \
+  test_getElementsByClassName-02.htm \
+  test_getElementsByClassName-03.htm \
+  test_getElementsByClassName-04.htm \
+  test_getElementsByClassName-05.htm \
+  test_getElementsByClassName-06.htm \
+  test_getElementsByClassName-07.htm \
+  test_getElementsByClassName-08.htm \
+  test_getElementsByClassName-09.htm \
+  test_getElementsByClassName-10.xml \
+  test_getElementsByClassName-11.xml \
+  test_getElementsByClassName-12.htm \
+  test_getElementsByClassName-13.htm \
+  test_getElementsByClassName-14.htm \
+  test_getElementsByClassName-15.htm \
+  test_getElementsByClassName-16.htm \
+  test_getElementsByClassName-17.htm \
+  test_getElementsByClassName-18.htm \
+  test_Node-appendChild.html \
+  test_Node-cloneNode.html \
+  test_Node-compareDocumentPosition.html \
+  test_Node-constants.html \
+  test_Node-contains.html \
+  test_Node-contains.xml \
+  test_Node-insertBefore.html \
+  test_Node-isEqualNode.xhtml \
+  test_Node-lookupPrefix.xhtml \
+  test_Node-nodeName.html \
+  test_Node-nodeName.xhtml \
+  test_Node-normalize.html \
+  test_Node-parentElement.html \
+  test_Node-parentNode.html \
+  test_Node-properties.html \
+  test_Node-removeChild.html \
+  test_Node-replaceChild.html \
+  attributes.js \
+  case.js \
+  ChildNode-remove.js \
+  creators.js \
+  Document-createProcessingInstruction.js \
+  encoding.php \
+  productions.js \
+  $(NULL)
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/attributes.js
rename to dom/imptests/html/dom/nodes/attributes.js
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/case.js
rename to dom/imptests/html/dom/nodes/case.js
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/creators.js
rename to dom/imptests/html/dom/nodes/creators.js
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/encoding.php
@@ -0,0 +1,2 @@
+<!doctype html>
+<meta charset="<?php echo htmlspecialchars($_GET['label']) ?>">
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/productions.js
rename to dom/imptests/html/dom/nodes/productions.js
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-appendData.html
rename to dom/imptests/html/dom/nodes/test_CharacterData-appendData.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-deleteData.html
rename to dom/imptests/html/dom/nodes/test_CharacterData-deleteData.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-insertData.html
rename to dom/imptests/html/dom/nodes/test_CharacterData-insertData.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-remove.html
rename to dom/imptests/html/dom/nodes/test_CharacterData-remove.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-replaceData.html
rename to dom/imptests/html/dom/nodes/test_CharacterData-replaceData.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html
rename to dom/imptests/html/dom/nodes/test_DOMImplementation-createDocument.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocumentType.html
rename to dom/imptests/html/dom/nodes/test_DOMImplementation-createDocumentType.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createHTMLDocument.html
rename to dom/imptests/html/dom/nodes/test_DOMImplementation-createHTMLDocument.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-hasFeature.html
rename to dom/imptests/html/dom/nodes/test_DOMImplementation-hasFeature.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-adoptNode.html
rename to dom/imptests/html/dom/nodes/test_Document-adoptNode.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createComment.html
rename to dom/imptests/html/dom/nodes/test_Document-createComment.html
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/nodes/test_Document-createElement-namespace.html
@@ -0,0 +1,103 @@
+<!doctype html>
+<title>document.createElement() namespace tests</title>
+<link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
+<div id=log></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"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.
+ */
+function testDoc(doc, contentType) {
+  // WebKit doesn't support document.contentType, so they don't get this sanity
+  // check :(
+  if (doc.contentType !== undefined) {
+    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);
+}
+
+// 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");
+}, "Created element's namespace in created HTML document");
+test(function() {
+  testDoc(document.implementation.createDocument(null, "", null),
+          "application/xml");
+}, "Created element's namespace in created XML document");
+test(function() {
+  testDoc(document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null),
+          "application/xml");
+}, "Created element's namespace in created XHTML document");
+test(function() {
+  testDoc(document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null),
+          "application/xml");
+}, "Created element's namespace in created SVG document");
+test(function() {
+  testDoc(document.implementation.createDocument("http://www.w3.org/1998/Math/MathML", "math", null),
+          "application/xml");
+}, "Created element's namespace in created MathML document");
+
+// Now for various externally-loaded files.  Note: these lists must be kept
+// synced with the lists in generate.py in the subdirectory, and that script
+// must be run whenever the lists are updated.  (We could keep the lists in a
+// shared JSON file, but it seems like too much effort.)
+var testExtensions = {
+  html: "text/html",
+  xhtml: "application/xhtml+xml",
+  xml: "application/xml",
+  svg: "image/svg+xml",
+  // Was not able to get server MIME type working properly :(
+  //mml: "application/mathml+xml",
+};
+
+var tests = [
+  "empty",
+  "minimal_html",
+  
+  "xhtml",
+  "svg",
+  "mathml",
+
+  "bare_xhtml",
+  "bare_svg",
+  "bare_mathml",
+
+  "xhtml_ns_removed",
+  "xhtml_ns_changed",
+];
+
+tests.forEach(function(testName) {
+  Object.keys(testExtensions).forEach(function(ext) {
+    var iframe = document.createElement("iframe");
+    iframe.src = "Document-createElement-namespace-tests/" +
+                 testName + "." + ext;
+    var t = async_test("Created element's namespace in " + testName + "." + ext);
+    iframe.onload = function() {
+      t.step(function() {
+        testDoc(iframe.contentDocument, testExtensions[ext]);
+      });
+      document.body.removeChild(iframe);
+      t.done();
+    };
+    document.body.appendChild(iframe);
+  });
+});
+</script>
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElement.html
rename to dom/imptests/html/dom/nodes/test_Document-createElement.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElementNS.html
rename to dom/imptests/html/dom/nodes/test_Document-createElementNS.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createEvent.html
rename to dom/imptests/html/dom/nodes/test_Document-createEvent.html
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createEvent.html
+++ b/dom/imptests/html/dom/nodes/test_Document-createEvent.html
@@ -1,27 +1,44 @@
 <!DOCTYPE html>
 <meta charset=utf-8>
 <title>Document.createEvent</title>
-<link rel=help href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-document-createevent">
+<link rel=help href="http://dom.spec.whatwg.org/#dom-document-createevent">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
-// TODO: values of attributes
 function testAlias(arg, iface) {
+  var ev;
+  test(function() {
+    ev = document.createEvent(arg);
+    assert_true(ev instanceof window[iface]);
+    assert_true(ev instanceof Event);
+  }, arg + " should be an alias for " + iface + ".");
   test(function() {
-    if (iface === "Event" || iface in window) {
-      var ev = document.createEvent(arg);
-      assert_true(ev instanceof window[iface]);
-      assert_true(ev instanceof Event);
-    }
-  }, arg + " should be an alias for " + iface + ".");
+    assert_equals(ev.type, "",
+                  "type should be initialized to the empty string");
+    assert_equals(ev.target, null,
+                  "target should be initialized to null");
+    assert_equals(ev.currentTarget, null,
+                  "currentTarget should be initialized to null");
+    assert_equals(ev.eventPhase, 0,
+                  "eventPhase should be initialized to NONE (0)");
+    assert_equals(ev.bubbles, false,
+                  "bubbles should be initialized to false");
+    assert_equals(ev.cancelable, false,
+                  "cancelable should be initialized to false");
+    assert_equals(ev.defaultPrevented, false,
+                  "defaultPrevented should be initialized to false");
+    assert_equals(ev.isTrusted, false,
+                  "isTrusted should be initialized to false");
+  }, "createEvent('" + arg + "') should be initialized correctly.");
 }
 [
+  ["CustomEvent", "CustomEvent"],
   ["Event", "Event"],
   ["Events", "Event"],
   ["HTMLEvents", "Event"],
   ["MouseEvent", "MouseEvent"],
   ["MouseEvents", "MouseEvent"],
   ["UIEvent", "UIEvent"],
   ["UIEvents", "UIEvent"]
 ].forEach(function(alias) {
@@ -33,10 +50,14 @@ function testAlias(arg, iface) {
 test(function() {
   assert_throws("NOT_SUPPORTED_ERR", function() {
     var evt = document.createEvent("foo");
   });
   assert_throws("NOT_SUPPORTED_ERR", function() {
     // 'LATIN CAPITAL LETTER I WITH DOT ABOVE' (U+0130)
     var evt = document.createEvent("U\u0130Event");
   });
+  assert_throws("NOT_SUPPORTED_ERR", function() {
+    // 'LATIN SMALL LETTER DOTLESS I' (U+0131)
+    var evt = document.createEvent("U\u0131Event");
+  });
 }, "Should throw NOT_SUPPORTED_ERR for unrecognized arguments");
 </script>
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction-literal-1.xhtml
rename to dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction-literal-1.xhtml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction-literal-2.xhtml
rename to dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction-literal-2.xhtml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction.html
rename to dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createProcessingInstruction.xhtml
rename to dom/imptests/html/dom/nodes/test_Document-createProcessingInstruction.xhtml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createTreeWalker.html
rename to dom/imptests/html/dom/nodes/test_Document-createTreeWalker.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementById.html
rename to dom/imptests/html/dom/nodes/test_Document-getElementById.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html
rename to dom/imptests/html/dom/nodes/test_Document-getElementsByTagName.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagNameNS.html
rename to dom/imptests/html/dom/nodes/test_Document-getElementsByTagNameNS.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-importNode.html
rename to dom/imptests/html/dom/nodes/test_Document-importNode.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DocumentType-remove.html
rename to dom/imptests/html/dom/nodes/test_DocumentType-remove.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-children.html
rename to dom/imptests/html/dom/nodes/test_Element-children.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-getElementsByClassName.html
rename to dom/imptests/html/dom/nodes/test_Element-getElementsByClassName.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-remove.html
rename to dom/imptests/html/dom/nodes/test_Element-remove.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-removeAttributeNS.html
rename to dom/imptests/html/dom/nodes/test_Element-removeAttributeNS.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-tagName.html
rename to dom/imptests/html/dom/nodes/test_Element-tagName.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-appendChild.html
rename to dom/imptests/html/dom/nodes/test_Node-appendChild.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-cloneNode.html
rename to dom/imptests/html/dom/nodes/test_Node-cloneNode.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Node-compareDocumentPosition.html
rename to dom/imptests/html/dom/nodes/test_Node-compareDocumentPosition.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Node-compareDocumentPosition.html
+++ b/dom/imptests/html/dom/nodes/test_Node-compareDocumentPosition.html
@@ -1,15 +1,15 @@
 <!doctype html>
 <title>Node.compareDocumentPosition() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testNodes.forEach(function(referenceName) {
   var reference = eval(referenceName);
   testNodes.forEach(function(otherName) {
     var other = eval(otherName);
     test(function() {
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-constants.html
rename to dom/imptests/html/dom/nodes/test_Node-constants.html
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-constants.html
+++ b/dom/imptests/html/dom/nodes/test_Node-constants.html
@@ -1,13 +1,13 @@
 <!doctype html>
 <title>Node constants</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
-<script src="constants.js"></script>
+<script src="../constants.js"></script>
 <div id="log"></div>
 <script>
 var objects = [
   [Node, "Node interface object"],
   [Node.prototype, "Node prototype object"],
   [document.createElement("foo"), "Element object"],
   [document.createTextNode("bar"), "Text object"]
 ]
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Node-contains.html
rename to dom/imptests/html/dom/nodes/test_Node-contains.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Node-contains.html
+++ b/dom/imptests/html/dom/nodes/test_Node-contains.html
@@ -1,15 +1,15 @@
 <!doctype html>
 <title>Node.contains() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testNodes.forEach(function(referenceName) {
   var reference = eval(referenceName);
 
   test(function() {
     assert_false(reference.contains(null));
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-contains.xml
rename to dom/imptests/html/dom/nodes/test_Node-contains.xml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-insertBefore.html
rename to dom/imptests/html/dom/nodes/test_Node-insertBefore.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml
rename to dom/imptests/html/dom/nodes/test_Node-isEqualNode.xhtml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-lookupPrefix.xhtml
rename to dom/imptests/html/dom/nodes/test_Node-lookupPrefix.xhtml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-nodeName.html
rename to dom/imptests/html/dom/nodes/test_Node-nodeName.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-nodeName.xhtml
rename to dom/imptests/html/dom/nodes/test_Node-nodeName.xhtml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-normalize.html
rename to dom/imptests/html/dom/nodes/test_Node-normalize.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-parentElement.html
rename to dom/imptests/html/dom/nodes/test_Node-parentElement.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-parentNode.html
rename to dom/imptests/html/dom/nodes/test_Node-parentNode.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Node-properties.html
rename to dom/imptests/html/dom/nodes/test_Node-properties.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Node-properties.html
+++ b/dom/imptests/html/dom/nodes/test_Node-properties.html
@@ -1,16 +1,16 @@
 <!doctype html>
 <title>Node assorted property tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <meta charset=utf-8>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 /**
  * First we define a data structure to tell us what tests to run.  The keys
  * will be eval()ed, and are mostly global variables defined in common.js.  The
  * values are objects, which maps properties to expected values.  So
  *
  * 	foo: {
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-removeChild.html
rename to dom/imptests/html/dom/nodes/test_Node-removeChild.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-replaceChild.html
rename to dom/imptests/html/dom/nodes/test_Node-replaceChild.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_attributes.html
rename to dom/imptests/html/dom/nodes/test_attributes.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_case.html
rename to dom/imptests/html/dom/nodes/test_case.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-01.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-01.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-02.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-02.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-03.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-03.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-04.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-04.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-05.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-05.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-06.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-06.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-07.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-07.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-08.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-08.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-09.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-09.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-10.xml
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-10.xml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-11.xml
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-11.xml
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-12.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-12.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-13.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-13.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-14.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-14.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-15.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-15.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-16.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-16.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-17.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-17.htm
rename from dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-18.htm
rename to dom/imptests/html/dom/nodes/test_getElementsByClassName-18.htm
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/ranges/Makefile.in
@@ -0,0 +1,25 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_Range-attributes.html \
+  test_Range-cloneContents.html \
+  test_Range-cloneRange.html \
+  test_Range-collapse.html \
+  test_Range-commonAncestorContainer-2.html \
+  test_Range-commonAncestorContainer.html \
+  test_Range-compareBoundaryPoints.html \
+  test_Range-comparePoint-2.html \
+  test_Range-comparePoint.html \
+  test_Range-deleteContents.html \
+  test_Range-detach.html \
+  test_Range-extractContents.html \
+  test_Range-insertNode.html \
+  test_Range-intersectsNode-binding.html \
+  test_Range-intersectsNode.html \
+  test_Range-isPointInRange.html \
+  test_Range-mutations.html \
+  test_Range-selectNode.html \
+  test_Range-set.html \
+  test_Range-surroundContents.html \
+  Range-test-iframe.html \
+  $(NULL)
rename from dom/imptests/webapps/DOMCore/tests/approved/Range-test-iframe.html
rename to dom/imptests/html/dom/ranges/Range-test-iframe.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/Range-test-iframe.html
+++ b/dom/imptests/html/dom/ranges/Range-test-iframe.html
@@ -1,13 +1,13 @@
 <!doctype html>
 <title>Range test iframe</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <body onload=run()>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 // This script only exists because we want to evaluate the range endpoints
 // in each iframe using that iframe's local variables set up by common.js.  It
 // just creates the range and does nothing else.  The data is returned via
 // window.testRange, and if an exception is thrown, it's put in
 // window.unexpectedException.
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/ranges/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-attributes.html
rename to dom/imptests/html/dom/ranges/test_Range-attributes.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneContents.html
rename to dom/imptests/html/dom/ranges/test_Range-cloneContents.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneContents.html
+++ b/dom/imptests/html/dom/ranges/test_Range-cloneContents.html
@@ -2,17 +2,17 @@
 <title>Range.cloneContents() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <p>To debug test failures, look at the URL of the hidden iframes corresponding
 to the test at the end of the document, load those individually, and use your
 browser's debugging tools.
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testDiv.parentNode.removeChild(testDiv);
 
 function myCloneContents(range) {
 	// "Let frag be a new DocumentFragment whose ownerDocument is the same as
 	// the ownerDocument of the context object's start node."
@@ -387,24 +387,22 @@ function onLoadExpected(i) {
 		assertNodesEqual(actualFrag, expectedFrag,
 			"returned fragment");
 	});
 	fragTests[i].done();
 }
 
 setup({timeout: 60000});
 
-// First test a detached Range, synchronously
+// First test a Range that has the no-op detach() called on it, synchronously
 test(function() {
 	var range = document.createRange();
 	range.detach();
-	assert_throws("INVALID_STATE_ERR", function() {
-		range.cloneContents();
-	}, "Detached Range must throw INVALID_STATE_ERR on .cloneContents()");
-}, "Detached Range");
+	assert_array_equals(range.cloneContents().childNodes, []);
+}, "Range.detach()");
 
 var domTests = [];
 var positionTests = [];
 var fragTests = [];
 var actualIframes = [];
 var expectedIframes = [];
 for (var i = 0; i < testRanges.length; i++) {
 	domTests.push(async_test("Resulting DOM for range " + i + " " + testRanges[i]));
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneRange.html
rename to dom/imptests/html/dom/ranges/test_Range-cloneRange.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneRange.html
+++ b/dom/imptests/html/dom/ranges/test_Range-cloneRange.html
@@ -1,26 +1,32 @@
 <!doctype html>
 <title>Range.cloneRange() and document.createRange() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 function testCloneRange(rangeEndpoints) {
 	var range;
 	if (rangeEndpoints == "detached") {
 		range = document.createRange();
 		range.detach();
-		assert_throws("INVALID_STATE_ERR", function() {
-			range.cloneRange();
-		}, "Detached Range must throw INVALID_STATE_ERR on .cloneRange()");
+		var clonedRange = range.cloneRange();
+		assert_equals(clonedRange.startContainer, range.startContainer,
+			"startContainers must be equal after cloneRange()");
+		assert_equals(clonedRange.startOffset, range.startOffset,
+			"startOffsets must be equal after cloneRange()");
+		assert_equals(clonedRange.endContainer, range.endContainer,
+			"endContainers must be equal after cloneRange()");
+		assert_equals(clonedRange.endOffset, range.endOffset,
+			"endOffsets must be equal after cloneRange()");
 		return;
 	}
 
 	// Have to account for Ranges involving Documents!  We could just create
 	// the Range from the current document unconditionally, but some browsers
 	// (WebKit) don't implement setStart() and setEnd() per spec and will throw
 	// spurious exceptions at the time of this writing.  No need to mask other
 	// bugs.
@@ -87,75 +93,19 @@ function testCloneRange(rangeEndpoints) 
 	assert_equals(range.startOffset, 1,
 		"Modifying a clone must not modify the original Range's startOffset");
 	assert_equals(range.endContainer, testNode1,
 		"Modifying a clone must not modify the original Range's endContainer");
 	assert_equals(range.endOffset, 2,
 		"Modifying a clone must not modify the original Range's endOffset");
 }
 
-var ranges = [
-	// Various ranges within the text node children of different paragraphs.
-	"[paras[0].firstChild, 0, paras[0].firstChild, 0]",
-	"[paras[0].firstChild, 0, paras[0].firstChild, 1]",
-	"[paras[0].firstChild, 2, paras[0].firstChild, 8]",
-	"[paras[0].firstChild, 2, paras[0].firstChild, 9]",
-	"[paras[1].firstChild, 0, paras[1].firstChild, 0]",
-	"[paras[1].firstChild, 0, paras[1].firstChild, 1]",
-	"[paras[1].firstChild, 2, paras[1].firstChild, 8]",
-	"[paras[1].firstChild, 2, paras[1].firstChild, 9]",
-	"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 0]",
-	"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 1]",
-	"[detachedPara1.firstChild, 2, detachedPara1.firstChild, 8]",
-	"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 0]",
-	"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 1]",
-	"[foreignPara1.firstChild, 2, foreignPara1.firstChild, 8]",
-	// Now try testing some elements, not just text nodes.
-	"[document.documentElement, 0, document.documentElement, 1]",
-	"[document.head, 1, document.head, 1]",
-	"[document.body, 4, document.body, 5]",
-	"[foreignDoc.documentElement, 0, foreignDoc.documentElement, 1]",
-	"[foreignDoc.head, 1, foreignDoc.head, 1]",
-	"[foreignDoc.body, 0, foreignDoc.body, 0]",
-	"[paras[0], 0, paras[0], 0]",
-	"[paras[0], 0, paras[0], 1]",
-	"[detachedPara1, 0, detachedPara1, 0]",
-	"[detachedPara1, 0, detachedPara1, 1]",
-	// Now try some ranges that span elements.
-	"[paras[0].firstChild, 0, paras[1].firstChild, 0]",
-	"[paras[0].firstChild, 0, paras[1].firstChild, 8]",
-	"[paras[0].firstChild, 3, paras[3], 1]",
-	// How about something that spans a node and its descendant?
-	"[paras[0], 0, paras[0].firstChild, 7]",
-	"[testDiv, 2, paras[4], 1]",
-	"[testDiv, 1, paras[2].firstChild, 5]",
-	"[foreignDoc.documentElement, 1, foreignDoc.body, 0]",
-	// Then a few silly things just for good measure.  (Well, document probably
-	// isn't entirely silly.)
-	"[document, 0, document, 1]",
-	"[foreignDoc, 0, foreignDoc, 0]",
-	"[xmlDoc, 0, xmlDoc, 0]",
-	"[detachedTextNode, 0, detachedTextNode, 8]",
-	"[foreignTextNode, 7, foreignTextNode, 7]",
-	"[foreignTextNode, 0, foreignTextNode, 8]",
-	"[xmlTextNode, 7, xmlTextNode, 7]",
-	"[xmlTextNode, 0, xmlTextNode, 8]",
-	"[comment, 5, comment, 5]",
-	"[foreignComment, 4, foreignComment, 4]",
-	"[xmlComment, 2, xmlComment, 6]",
-	"[docfrag, 0, docfrag, 0]",
-	"[foreignDocfrag, 0, foreignDocfrag, 0]",
-	"[xmlDocfrag, 0, xmlDocfrag, 0]",
-	// Magic keyword!
-	'"detached"'
-];
-
 var tests = [];
-for (var i = 0; i < ranges.length; i++) {
+for (var i = 0; i < testRanges.length; i++) {
 	tests.push([
-		"Range " + i + " " + ranges[i],
-		eval(ranges[i])
+		"Range " + i + " " + testRanges[i],
+		eval(testRanges[i])
 	]);
 }
 generate_tests(testCloneRange, tests);
 
 testDiv.style.display = "none";
 </script>
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-collapse.html
rename to dom/imptests/html/dom/ranges/test_Range-collapse.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-collapse.html
+++ b/dom/imptests/html/dom/ranges/test_Range-collapse.html
@@ -1,29 +1,26 @@
 <!doctype html>
 <title>Range.collapse() and .collapsed tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 function testCollapse(rangeEndpoints, toStart) {
 	var range;
 	if (rangeEndpoints == "detached") {
 		range = document.createRange();
 		range.detach();
-		assert_throws("INVALID_STATE_ERR", function() {
-			range.collapse(toStart);
-		}, "Detached Range must throw INVALID_STATE_ERR on .collapse()");
-		assert_throws("INVALID_STATE_ERR", function() {
-			range.collapsed;
-		}, "Detached Range must throw INVALID_STATE_ERR on .collapsed access");
+		range.collapse(toStart);
+		assert_true(range.collapsed,
+			".collapsed must be set after .collapsed()");
 		return;
 	}
 
 	// Have to account for Ranges involving Documents!
 	var ownerDoc = rangeEndpoints[0].nodeType == Node.DOCUMENT_NODE
 		? rangeEndpoints[0]
 		: rangeEndpoints[0].ownerDocument;
 	range = ownerDoc.createRange();
@@ -46,90 +43,25 @@ function testCollapse(rangeEndpoints, to
 	assert_equals(range.startOffset, expectedOffset,
 		"Wrong startOffset");
 	assert_equals(range.endOffset, expectedOffset,
 		"Wrong endOffset");
 	assert_true(range.collapsed,
 		".collapsed must be set after .collapsed()");
 }
 
-var ranges = [
-	// Various ranges within the text node children of different paragraphs.
-	// (I don't try going out of bounds anywhere here, because these are used
-	// for setup, not testing setStart()/setEnd().)
-	//
-	// Note that the length of the in-document paragraphs is actually 9, due to
-	// the newline, but the detached and foreign ones lack the newline, so
-	// their length is 8.
-	//
-	// The format is a bit evil, but it's the only sensible way to output test
-	// names.
-	"[paras[0].firstChild, 0, paras[0].firstChild, 0]",
-	"[paras[0].firstChild, 0, paras[0].firstChild, 1]",
-	"[paras[0].firstChild, 2, paras[0].firstChild, 8]",
-	"[paras[0].firstChild, 2, paras[0].firstChild, 9]",
-	"[paras[1].firstChild, 0, paras[1].firstChild, 0]",
-	"[paras[1].firstChild, 0, paras[1].firstChild, 1]",
-	"[paras[1].firstChild, 2, paras[1].firstChild, 8]",
-	"[paras[1].firstChild, 2, paras[1].firstChild, 9]",
-	"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 0]",
-	"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 1]",
-	"[detachedPara1.firstChild, 2, detachedPara1.firstChild, 8]",
-	"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 0]",
-	"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 1]",
-	"[foreignPara1.firstChild, 2, foreignPara1.firstChild, 8]",
-	// Now try testing some elements, not just text nodes.
-	"[document.documentElement, 0, document.documentElement, 1]",
-	"[document.head, 1, document.head, 1]",
-	"[document.body, 4, document.body, 5]",
-	"[foreignDoc.documentElement, 0, foreignDoc.documentElement, 1]",
-	"[foreignDoc.head, 1, foreignDoc.head, 1]",
-	"[foreignDoc.body, 0, foreignDoc.body, 0]",
-	"[paras[0], 0, paras[0], 0]",
-	"[paras[0], 0, paras[0], 1]",
-	"[detachedPara1, 0, detachedPara1, 0]",
-	"[detachedPara1, 0, detachedPara1, 1]",
-	// Now try some ranges that span elements.
-	"[paras[0].firstChild, 0, paras[1].firstChild, 0]",
-	"[paras[0].firstChild, 0, paras[1].firstChild, 8]",
-	"[paras[0].firstChild, 3, paras[3], 1]",
-	// How about something that spans a node and its descendant?
-	"[paras[0], 0, paras[0].firstChild, 7]",
-	"[testDiv, 2, paras[4], 1]",
-	"[testDiv, 1, paras[2].firstChild, 5]",
-	"[foreignDoc.documentElement, 1, foreignDoc.body, 0]",
-	// Then a few silly things just for good measure.  (Well, document probably
-	// isn't entirely silly.)
-	"[document, 0, document, 1]",
-	"[foreignDoc, 0, foreignDoc, 0]",
-	"[xmlDoc, 0, xmlDoc, 0]",
-	"[detachedTextNode, 0, detachedTextNode, 8]",
-	"[foreignTextNode, 7, foreignTextNode, 7]",
-	"[foreignTextNode, 0, foreignTextNode, 8]",
-	"[xmlTextNode, 7, xmlTextNode, 7]",
-	"[xmlTextNode, 0, xmlTextNode, 8]",
-	"[comment, 5, comment, 5]",
-	"[foreignComment, 4, foreignComment, 4]",
-	"[xmlComment, 2, xmlComment, 6]",
-	"[docfrag, 0, docfrag, 0]",
-	"[foreignDocfrag, 0, foreignDocfrag, 0]",
-	"[xmlDocfrag, 0, xmlDocfrag, 0]",
-	// Magic keyword!
-	'"detached"'
-];
-
 var tests = [];
-for (var i = 0; i < ranges.length; i++) {
+for (var i = 0; i < testRanges.length; i++) {
 	tests.push([
-		"Range " + i + " " + ranges[i] + ", toStart true",
-		eval(ranges[i]),
+		"Range " + i + " " + testRanges[i] + ", toStart true",
+		eval(testRanges[i]),
 		true
 	]);
 	tests.push([
-		"Range " + i + " " + ranges[i] + ", toStart false",
-		eval(ranges[i]),
+		"Range " + i + " " + testRanges[i] + ", toStart false",
+		eval(testRanges[i]),
 		false
 	]);
 }
 generate_tests(testCollapse, tests);
 
 testDiv.style.display = "none";
 </script>
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html
rename to dom/imptests/html/dom/ranges/test_Range-commonAncestorContainer-2.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-commonAncestorContainer.html
rename to dom/imptests/html/dom/ranges/test_Range-commonAncestorContainer.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-commonAncestorContainer.html
+++ b/dom/imptests/html/dom/ranges/test_Range-commonAncestorContainer.html
@@ -1,39 +1,30 @@
 <!doctype html>
 <title>Range.commonAncestorContainer tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testRanges.unshift("[detached]");
 
 for (var i = 0; i < testRanges.length; i++) {
 	test(function() {
 		var range;
 		if (i == 0) {
 			range = document.createRange();
 			range.detach();
 		} else {
 			range = rangeFromEndpoints(eval(testRanges[i]));
 		}
 
-		// "If the detached flag is set, throw an "InvalidStateError" exception
-		// and terminate these steps."
-		if (i == 0) {
-			assert_throws("INVALID_STATE_ERR", function() {
-				range.commonAncestorContainer;
-			}, "Detached range must throw InvalidStateError");
-			return;
-		}
-
 		// "Let container be start node."
 		var container = range.startContainer;
 
 		// "While container is not an inclusive ancestor of end node, let
 		// container be container's parent."
 		while (container != range.endContainer
 		&& !isAncestor(container, range.endContainer)) {
 			container = container.parentNode;
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-compareBoundaryPoints.html
rename to dom/imptests/html/dom/ranges/test_Range-compareBoundaryPoints.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-compareBoundaryPoints.html
+++ b/dom/imptests/html/dom/ranges/test_Range-compareBoundaryPoints.html
@@ -1,24 +1,24 @@
 <!doctype html>
 <title>Range.compareBoundaryPoints() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 var testRangesCached = [];
 testRangesCached.push(document.createRange());
 testRangesCached[0].detach();
-for (var i = 0; i < testRanges.length; i++) {
+for (var i = 0; i < testRangesShort.length; i++) {
 	try {
-		testRangesCached.push(rangeFromEndpoints(eval(testRanges[i])));
+		testRangesCached.push(rangeFromEndpoints(eval(testRangesShort[i])));
 	} catch(e) {
 		testRangesCached.push(null);
 	}
 }
 
 var testRangesCachedClones = [];
 testRangesCachedClones.push(document.createRange());
 testRangesCachedClones[0].detach();
@@ -100,26 +100,16 @@ for (var i = 0; i < testRangesCached.len
 					// "Return int16bit."
 					convertedHow = posInt % 65536;
 					if (convertedHow < 0) {
 						convertedHow += 65536;
 					}
 				}
 
 				// Now to the actual algorithm.
-				// "If context object's or sourceRange's detached flag is set,
-				// throw an "InvalidStateError" exception and terminate these
-				// steps."
-				if (i == 0 || j == 0) {
-					assert_throws("INVALID_STATE_ERR", function() {
-						range1.compareBoundaryPoints(how, range2);
-					}, "InvalidStateError required if one of the ranges is detached");
-					return;
-				}
-
 				// "If how is not one of
 				//   START_TO_START,
 				//   START_TO_END,
 				//   END_TO_END, and
 				//   END_TO_START,
 				// throw a "NotSupportedError" exception and terminate these
 				// steps."
 				if (convertedHow != Range.START_TO_START
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html
rename to dom/imptests/html/dom/ranges/test_Range-comparePoint-2.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-comparePoint.html
rename to dom/imptests/html/dom/ranges/test_Range-comparePoint.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-comparePoint.html
+++ b/dom/imptests/html/dom/ranges/test_Range-comparePoint.html
@@ -1,15 +1,15 @@
 <!doctype html>
 <title>Range.comparePoint() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 // Will be filled in on the first run for that range
 var testRangesCached = [];
 
 for (var i = 0; i < testPoints.length; i++) {
 	var node = eval(testPoints[i])[0];
@@ -17,26 +17,16 @@ for (var i = 0; i < testPoints.length; i
 
 	// comparePoint is an unsigned long, so per WebIDL, we need to treat it as
 	// though it wrapped to an unsigned 32-bit integer.
 	var normalizedOffset = offset % Math.pow(2, 32);
 	if (normalizedOffset < 0) {
 		normalizedOffset += Math.pow(2, 32);
 	}
 
-	// "If the detached flag is set, throw an "InvalidStateError" exception and
-	// terminate these steps."
-	test(function() {
-		var range = document.createRange();
-		range.detach();
-		assert_throws("INVALID_STATE_ERR", function() {
-			range.comparePoint(node, offset);
-		}, "Must throw InvalidStateError if range is detached");
-	}, "Point " + i + " " + testPoints[i] + ", detached range");
-
 	for (var j = 0; j < testRanges.length; j++) {
 		test(function() {
 			if (testRangesCached[j] === undefined) {
 				try {
 					testRangesCached[j] = rangeFromEndpoints(eval(testRanges[i]));
 				} catch(e) {
 					testRangesCached[j] = null;
 				}
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-deleteContents.html
rename to dom/imptests/html/dom/ranges/test_Range-deleteContents.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-deleteContents.html
+++ b/dom/imptests/html/dom/ranges/test_Range-deleteContents.html
@@ -2,17 +2,17 @@
 <title>Range.deleteContents() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <p>To debug test failures, look at the URL of the hidden iframes corresponding
 to the test at the end of the document, load those individually, and use your
 browser's debugging tools.
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testDiv.parentNode.removeChild(testDiv);
 
 function myDeleteContents(range) {
 	// "If the context object's start and end are the same, abort this method."
 	if (range.startContainer == range.endContainer
@@ -270,19 +270,17 @@ function onLoadExpected(i) {
 }
 
 setup({timeout: 60000});
 
 // First test a detached Range, synchronously
 test(function() {
 	var range = document.createRange();
 	range.detach();
-	assert_throws("INVALID_STATE_ERR", function() {
-		range.deleteContents();
-	}, "Detached Range must throw INVALID_STATE_ERR on .deleteContents()");
+	range.deleteContents();
 }, "Detached Range");
 
 var domTests = [];
 var positionTests = [];
 var actualIframes = [];
 var expectedIframes = [];
 for (var i = 0; i < testRanges.length; i++) {
 	domTests.push(async_test("Resulting DOM for range " + i + " " + testRanges[i]));
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html
rename to dom/imptests/html/dom/ranges/test_Range-detach.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-extractContents.html
rename to dom/imptests/html/dom/ranges/test_Range-extractContents.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-extractContents.html
+++ b/dom/imptests/html/dom/ranges/test_Range-extractContents.html
@@ -2,17 +2,17 @@
 <title>Range.extractContents() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <p>To debug test failures, look at the URL of the hidden iframes corresponding
 to the test at the end of the document, load those individually, and use your
 browser's debugging tools.
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testDiv.parentNode.removeChild(testDiv);
 
 function testExtractContents(i) {
 	// We only load the expected once the actual is finished, to avoid race
 	// conditions.  First set the onload to null and the src to the empty
@@ -185,19 +185,17 @@ function onLoadExpected(i) {
 }
 
 setup({timeout: 60000});
 
 // First test a detached Range, synchronously
 test(function() {
 	var range = document.createRange();
 	range.detach();
-	assert_throws("INVALID_STATE_ERR", function() {
-		range.extractContents();
-	}, "Detached Range must throw INVALID_STATE_ERR on .extractContents()");
+	assert_array_equals(range.extractContents().childNodes, []);
 }, "Detached Range");
 
 var domTests = [];
 var positionTests = [];
 var fragTests = [];
 var actualIframes = [];
 var expectedIframes = [];
 for (var i = 0; i < testRanges.length; i++) {
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-insertNode.html
rename to dom/imptests/html/dom/ranges/test_Range-insertNode.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-insertNode.html
+++ b/dom/imptests/html/dom/ranges/test_Range-insertNode.html
@@ -2,17 +2,17 @@
 <title>Range.insertNode() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <p>To debug test failures, add a query parameter with the test id (like
 "?5,16").  Only that test will be run.  Then you can look at the resulting
 iframes in the DOM.
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testDiv.parentNode.removeChild(testDiv);
 
 function restoreIframe(iframe, i, j) {
 	// Most of this function is designed to work around the fact that Opera
 	// doesn't let you add a doctype to a document that no longer has one, in
@@ -33,18 +33,18 @@ function restoreIframe(iframe, i, j) {
 		// This will throw an exception in Opera if we reach here, which is why
 		// I try to avoid it.  It will never happen in a browser that obeys the
 		// spec, so it's really just insurance.  I don't think it actually gets
 		// hit by anything.
 		iframe.contentDocument.appendChild(iframe.contentDocument.implementation.createDocumentType("html", "", ""));
 	}
 	iframe.contentDocument.appendChild(referenceDoc.documentElement.cloneNode(true));
 	iframe.contentWindow.setupRangeTests();
-	iframe.contentWindow.testRangeInput = testRanges[i];
-	iframe.contentWindow.testNodeInput = testNodes[j];
+	iframe.contentWindow.testRangeInput = testRangesShort[i];
+	iframe.contentWindow.testNodeInput = testNodesShort[j];
 	iframe.contentWindow.run();
 }
 
 function testInsertNode(i, j) {
 	var actualRange;
 	var expectedRange;
 	var actualNode;
 	var expectedNode;
@@ -231,36 +231,36 @@ function testInsertNode(i, j) {
 			"startContainer superficially looks right but is actually the wrong node if you trace back its index in all its ancestors (I'm surprised this actually happened");
 	});
 	positionTests[i][j].done();
 }
 
 testRanges.unshift('"detached"');
 
 var iStart = 0;
-var iStop = testRanges.length;
+var iStop = testRangesShort.length;
 var jStart = 0;
-var jStop = testNodes.length;
+var jStop = testNodesShort.length;
 
 if (/[0-9]+,[0-9]+/.test(location.search)) {
 	var matches = /([0-9]+),([0-9]+)/.exec(location.search);
 	iStart = Number(matches[1]);
 	iStop = Number(matches[1]) + 1;
 	jStart = Number(matches[2]) + 0;
 	jStop = Number(matches[2]) + 1;
 }
 
 var domTests = [];
 var positionTests = [];
 for (var i = iStart; i < iStop; i++) {
 	domTests[i] = [];
 	positionTests[i] = [];
 	for (var j = jStart; j < jStop; j++) {
-		domTests[i][j] = async_test(i + "," + j + ": resulting DOM for range " + testRanges[i] + ", node " + testNodes[j]);
-		positionTests[i][j] = async_test(i + "," + j + ": resulting range position for range " + testRanges[i] + ", node " + testNodes[j]);
+		domTests[i][j] = async_test(i + "," + j + ": resulting DOM for range " + testRangesShort[i] + ", node " + testNodesShort[j]);
+		positionTests[i][j] = async_test(i + "," + j + ": resulting range position for range " + testRangesShort[i] + ", node " + testNodesShort[j]);
 	}
 }
 
 var actualIframe = document.createElement("iframe");
 actualIframe.style.display = "none";
 document.body.appendChild(actualIframe);
 
 var expectedIframe = document.createElement("iframe");
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-intersectsNode-binding.html
rename to dom/imptests/html/dom/ranges/test_Range-intersectsNode-binding.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-intersectsNode.html
rename to dom/imptests/html/dom/ranges/test_Range-intersectsNode.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-intersectsNode.html
+++ b/dom/imptests/html/dom/ranges/test_Range-intersectsNode.html
@@ -1,32 +1,30 @@
 <!doctype html>
 <title>Range.intersectsNode() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 // Will be filled in on the first run for that range
 var testRangesCached = [];
 
 for (var i = 0; i < testNodes.length; i++) {
 	var node = eval(testNodes[i]);
 
 	// "If the detached flag is set, throw an "InvalidStateError" exception and
 	// terminate these steps."
 	test(function() {
 		var range = document.createRange();
 		range.detach();
-		assert_throws("INVALID_STATE_ERR", function() {
-			range.intersectsNode(node);
-		}, "Must throw InvalidStateError if range is detached");
+		assert_equals(range.intersectsNode(node), node === document);
 	}, "Node " + i + " " + testNodes[i] + ", detached range");
 
 	for (var j = 0; j < testRanges.length; j++) {
 		test(function() {
 			if (testRangesCached[j] === undefined) {
 				try {
 					testRangesCached[j] = rangeFromEndpoints(eval(testRanges[i]));
 				} catch(e) {
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-isPointInRange.html
rename to dom/imptests/html/dom/ranges/test_Range-isPointInRange.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-isPointInRange.html
+++ b/dom/imptests/html/dom/ranges/test_Range-isPointInRange.html
@@ -1,54 +1,44 @@
 <!doctype html>
 <title>Range.isPointInRange() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
-// Will be filled in on the first run for that range
 var testRangesCached = [];
+test(function() {
+	for (var j = 0; j < testRanges.length; j++) {
+		test(function() {
+			testRangesCached[j] = rangeFromEndpoints(eval(testRanges[j]));
+		}, "Set up for range " + j + " " + testRanges[j]);
+	}
+	var detachedRange = document.createRange();
+	detachedRange.detach();
+	testRanges.push("detached");
+	testRangesCached.push(detachedRange);
+}, "Setup");
 
 for (var i = 0; i < testPoints.length; i++) {
 	var node = eval(testPoints[i])[0];
 	var offset = eval(testPoints[i])[1];
 
 	// isPointInRange is an unsigned long, so per WebIDL, we need to treat it
 	// as though it wrapped to an unsigned 32-bit integer.
 	var normalizedOffset = offset % Math.pow(2, 32);
 	if (normalizedOffset < 0) {
 		normalizedOffset += Math.pow(2, 32);
 	}
 
-	// "If the detached flag is set, throw an "InvalidStateError" exception and
-	// terminate these steps."
-	test(function() {
-		var range = document.createRange();
-		range.detach();
-		assert_throws("INVALID_STATE_ERR", function() {
-			range.isPointInRange(node, offset);
-		}, "Must throw InvalidStateError if range is detached");
-	}, "Point " + i + " " + testPoints[i] + ", detached range");
-
 	for (var j = 0; j < testRanges.length; j++) {
 		test(function() {
-			if (testRangesCached[j] === undefined) {
-				try {
-					testRangesCached[j] = rangeFromEndpoints(eval(testRanges[i]));
-				} catch(e) {
-					testRangesCached[j] = null;
-				}
-			}
-			assert_not_equals(testRangesCached[j], null,
-				"Setting up the range failed");
-
 			var range = testRangesCached[j].cloneRange();
 
 			// "If node's root is different from the context object's root,
 			// return false and terminate these steps."
 			if (furthestAncestor(node) !== furthestAncestor(range.startContainer)) {
 				assert_false(range.isPointInRange(node, offset),
 					"Must return false if node has a different root from the context object");
 				return;
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-mutations.html
rename to dom/imptests/html/dom/ranges/test_Range-mutations.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-mutations.html
+++ b/dom/imptests/html/dom/ranges/test_Range-mutations.html
@@ -1,15 +1,15 @@
 <!doctype html>
 <title>Range mutation tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 // These tests probably use too much abstraction and too little copy-paste.
 // Reader beware.
 //
 // TODO:
 //
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-selectNode.html
rename to dom/imptests/html/dom/ranges/test_Range-selectNode.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-selectNode.html
+++ b/dom/imptests/html/dom/ranges/test_Range-selectNode.html
@@ -1,15 +1,15 @@
 <!doctype html>
 <title>Range.selectNode() and .selectNodeContents() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 function testSelectNode(range, node) {
 	try {
 		range.collapsed;
 	} catch (e) {
 		// Range is detached
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-set.html
rename to dom/imptests/html/dom/ranges/test_Range-set.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-set.html
+++ b/dom/imptests/html/dom/ranges/test_Range-set.html
@@ -1,15 +1,15 @@
 <!doctype html>
 <title>Range setting tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 function testSetStart(range, node, offset) {
 	if (node.nodeType == Node.DOCUMENT_TYPE_NODE) {
 		assert_throws("INVALID_NODE_TYPE_ERR", function() {
 			range.setStart(node, offset);
 		}, "setStart() to a doctype must throw INVALID_NODE_TYPE_ERR");
@@ -150,120 +150,70 @@ function testSetEndAfter(range, node) {
 	while (node.parentNode.childNodes[idx] != node) {
 		idx++;
 	}
 
 	testSetEnd(range, node.parentNode, idx + 1);
 }
 
 
-test(function() {
-	for (var i = 0; i < testPoints.length; i++) {
-		var point = eval(testPoints[i]);
-		assert_throws("INVALID_STATE_ERR", function() {
-			var range = document.createRange();
-			range.detach();
-
-			range.setStart(point[0], point[1]);
-		}, "setStart(" + testPoints[i] + ")");
-
-		assert_throws("INVALID_STATE_ERR", function() {
-			var range = document.createRange();
-			range.detach();
-
-			range.setEnd(point[0], point[1]);
-		}, "setEnd(" + testPoints[i] + ")");
-	}
-
-	for (var i = 0; i < testNodes.length; i++) {
-		var node = eval(testNodes[i]);
-		assert_throws("INVALID_STATE_ERR", function() {
-			var range = document.createRange();
-			range.detach();
-
-			range.setStartBefore(node);
-		}, "setStartBefore(" + testNodes[i] + ")");
-
-		assert_throws("INVALID_STATE_ERR", function() {
-			var range = document.createRange();
-			range.detach();
-
-			range.setStartAfter(node);
-		}, "setStartAfter(" + testNodes[i] + "");
-
-		assert_throws("INVALID_STATE_ERR", function() {
-			var range = document.createRange();
-			range.detach();
-
-			range.setEndBefore(node);
-		}, "setEndBefore(" + testNodes[i] + ")");
-
-		assert_throws("INVALID_STATE_ERR", function() {
-			var range = document.createRange();
-			range.detach();
-
-			range.setStartAfter(node);
-		}, "setEndAfter(" + testNodes[i] + ")");
-	}
-}, "Setting boundary points on a detached Range must throw INVALID_STATE_ERR");
-
 var startTests = [];
 var endTests = [];
 var startBeforeTests = [];
 var startAfterTests = [];
 var endBeforeTests = [];
 var endAfterTests = [];
 
 // Don't want to eval() each point a bazillion times
 var testPointsCached = testPoints.map(eval);
-var testNodesCached = testNodes.map(eval);
+var testNodesCached = testNodesShort.map(eval);
 
-for (var i = 0; i < testRanges.length; i++) {
-	var endpoints = eval(testRanges[i]);
+for (var i = 0; i < testRangesShort.length; i++) {
+	var endpoints = eval(testRangesShort[i]);
 	var range;
 	test(function() {
 		range = ownerDocument(endpoints[0]).createRange();
 		range.setStart(endpoints[0], endpoints[1]);
 		range.setEnd(endpoints[2], endpoints[3]);
-	}, "Set up range " + i + " " + testRanges[i]);
+	}, "Set up range " + i + " " + testRangesShort[i]);
 
 	for (var j = 0; j < testPoints.length; j++) {
-		startTests.push(["setStart() with range " + i + " " + testRanges[i] + ", point " + j + " " + testPoints[j],
+		startTests.push(["setStart() with range " + i + " " + testRangesShort[i] + ", point " + j + " " + testPoints[j],
 			range,
 			testPointsCached[j][0],
 			testPointsCached[j][1]
 		]);
-		endTests.push(["setEnd() with range " + i + " " + testRanges[i] + ", point " + j + " " + testPoints[j],
+		endTests.push(["setEnd() with range " + i + " " + testRangesShort[i] + ", point " + j + " " + testPoints[j],
 			range,
 			testPointsCached[j][0],
 			testPointsCached[j][1]
 		]);
 	}
 
-	for (var j = 0; j < testNodes.length; j++) {
-		startBeforeTests.push(["setStartBefore() with range " + i + " " + testRanges[i] + ", node " + j + " " + testNodes[j],
+	for (var j = 0; j < testNodesShort.length; j++) {
+		startBeforeTests.push(["setStartBefore() with range " + i + " " + testRangesShort[i] + ", node " + j + " " + testNodesShort[j],
 			range,
 			testNodesCached[j]
 		]);
-		startAfterTests.push(["setStartAfter() with range " + i + " " + testRanges[i] + ", node " + j + " " + testNodes[j],
+		startAfterTests.push(["setStartAfter() with range " + i + " " + testRangesShort[i] + ", node " + j + " " + testNodesShort[j],
 			range,
 			testNodesCached[j]
 		]);
-		endBeforeTests.push(["setEndBefore() with range " + i + " " + testRanges[i] + ", node " + j + " " + testNodes[j],
+		endBeforeTests.push(["setEndBefore() with range " + i + " " + testRangesShort[i] + ", node " + j + " " + testNodesShort[j],
 			range,
 			testNodesCached[j]
 		]);
-		endAfterTests.push(["setEndAfter() with range " + i + " " + testRanges[i] + ", node " + j + " " + testNodes[j],
+		endAfterTests.push(["setEndAfter() with range " + i + " " + testRangesShort[i] + ", node " + j + " " + testNodesShort[j],
 			range,
 			testNodesCached[j]
 		]);
 	}
 }
 
 generate_tests(testSetStart, startTests);
 generate_tests(testSetEnd, endTests);
 generate_tests(testSetStartBefore, startBeforeTests);
 generate_tests(testSetStartAfter, startAfterTests);
-generate_tests(testSetEndBefore, startBeforeTests);
-generate_tests(testSetEndAfter, startAfterTests);
+generate_tests(testSetEndBefore, endBeforeTests);
+generate_tests(testSetEndAfter, endAfterTests);
 
 testDiv.style.display = "none";
 </script>
rename from dom/imptests/webapps/DOMCore/tests/approved/test_Range-surroundContents.html
rename to dom/imptests/html/dom/ranges/test_Range-surroundContents.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_Range-surroundContents.html
+++ b/dom/imptests/html/dom/ranges/test_Range-surroundContents.html
@@ -3,17 +3,17 @@
 <title>Range.surroundContents() tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <p>To debug test failures, add a query parameter with the test id (like
 "?5,16").  Only that test will be run.  Then you can look at the resulting
 iframes in the DOM.
 <div id=log></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
+<script src=../common.js></script>
 <script>
 "use strict";
 
 testDiv.parentNode.removeChild(testDiv);
 
 function mySurroundContents(range, newParent) {
 	try {
 		// "If the detached flag is set, throw an "InvalidStateError" exception
@@ -99,18 +99,18 @@ function restoreIframe(iframe, i, j) {
 		// This will throw an exception in Opera if we reach here, which is why
 		// I try to avoid it.  It will never happen in a browser that obeys the
 		// spec, so it's really just insurance.  I don't think it actually gets
 		// hit by anything.
 		iframe.contentDocument.appendChild(iframe.contentDocument.implementation.createDocumentType("html", "", ""));
 	}
 	iframe.contentDocument.appendChild(referenceDoc.documentElement.cloneNode(true));
 	iframe.contentWindow.setupRangeTests();
-	iframe.contentWindow.testRangeInput = testRanges[i];
-	iframe.contentWindow.testNodeInput = testNodes[j];
+	iframe.contentWindow.testRangeInput = testRangesShort[i];
+	iframe.contentWindow.testNodeInput = testNodesShort[j];
 	iframe.contentWindow.run();
 }
 
 function testSurroundContents(i, j) {
 	var actualRange;
 	var expectedRange;
 	var actualNode;
 	var expectedNode;
@@ -297,36 +297,36 @@ function testSurroundContents(i, j) {
 			"startContainer superficially looks right but is actually the wrong node if you trace back its index in all its ancestors (I'm surprised this actually happened");
 	});
 	positionTests[i][j].done();
 }
 
 testRanges.unshift('"detached"');
 
 var iStart = 0;
-var iStop = testRanges.length;
+var iStop = testRangesShort.length;
 var jStart = 0;
-var jStop = testNodes.length;
+var jStop = testNodesShort.length;
 
 if (/[0-9]+,[0-9]+/.test(location.search)) {
 	var matches = /([0-9]+),([0-9]+)/.exec(location.search);
 	iStart = Number(matches[1]);
 	iStop = Number(matches[1]) + 1;
 	jStart = Number(matches[2]) + 0;
 	jStop = Number(matches[2]) + 1;
 }
 
 var domTests = [];
 var positionTests = [];
 for (var i = iStart; i < iStop; i++) {
 	domTests[i] = [];
 	positionTests[i] = [];
 	for (var j = jStart; j < jStop; j++) {
-		domTests[i][j] = async_test(i + "," + j + ": resulting DOM for range " + testRanges[i] + ", node " + testNodes[j]);
-		positionTests[i][j] = async_test(i + "," + j + ": resulting range position for range " + testRanges[i] + ", node " + testNodes[j]);
+		domTests[i][j] = async_test(i + "," + j + ": resulting DOM for range " + testRangesShort[i] + ", node " + testNodesShort[j]);
+		positionTests[i][j] = async_test(i + "," + j + ": resulting range position for range " + testRangesShort[i] + ", node " + testNodesShort[j]);
 	}
 }
 
 var actualIframe = document.createElement("iframe");
 actualIframe.style.display = "none";
 actualIframe.id = "actual";
 document.body.appendChild(actualIframe);
 
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_historical.html
rename to dom/imptests/html/dom/test_historical.html
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_interfaces.html
rename to dom/imptests/html/dom/test_interface-objects.html
rename from dom/imptests/webapps/DOMCore/tests/approved/test_interfaces.html
rename to dom/imptests/html/dom/test_interfaces.html
--- a/dom/imptests/webapps/DOMCore/tests/approved/test_interfaces.html
+++ b/dom/imptests/html/dom/test_interfaces.html
@@ -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, optional DocumentType? doctype = null);
+  XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, DocumentType? doctype);
   Document createHTMLDocument(optional DOMString title);
 
   boolean hasFeature(DOMString feature, [TreatNullAs=EmptyString] DOMString version);
 };
 
 [Constructor]
 interface DocumentFragment : Node {
 };
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/traversal/Makefile.in
@@ -0,0 +1,5 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  test_NodeFilter-constants.html \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/traversal/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html
rename to dom/imptests/html/dom/traversal/test_NodeFilter-constants.html
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html
+++ b/dom/imptests/html/dom/traversal/test_NodeFilter-constants.html
@@ -1,13 +1,13 @@
 <!doctype html>
 <title>NodeFilter constants</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
-<script src="constants.js"></script>
+<script src="../constants.js"></script>
 <div id="log"></div>
 <script>
 var objects = [
   [NodeFilter, "NodeFilter interface object"],
 ]
 testConstants(objects, [
   ["FILTER_ACCEPT", 1],
   ["FILTER_REJECT", 2],
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/traversal/unfinished/Makefile.in
@@ -0,0 +1,5 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+MOCHITEST_FILES := \
+  TODO \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/traversal/unfinished/TODO
@@ -0,0 +1,1 @@
+Check what happens when a NodeFilter turns a number not in the range 1..3
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/imptests/html/dom/traversal/unfinished/moz.build
@@ -0,0 +1,4 @@
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
+
+DIRS += [
+]
--- a/dom/imptests/moz.build
+++ b/dom/imptests/moz.build
@@ -2,34 +2,36 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # 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/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/dom/elements/global-attributes',
     'failures/html/html/obsolete/implreq/oeaaa',
     'failures/html/html/semantics/forms/the-form-element',
     'failures/html/html/semantics/forms/the-option-element',
     'failures/html/html/semantics/forms/the-select-element',
     'failures/html/html/semantics/scripting-1/the-script-element',
     'failures/html/html/semantics/tabular-data/the-table-element',
     'failures/html/html/webappapis/atob',
     'failures/html/js/builtins',
     'failures/html/old-tests/submission/Opera/microdata',
     'failures/html/typedarrays',
-    'failures/webapps/DOMCore/tests/approved',
-    'failures/webapps/DOMCore/tests/submissions/Ms2ger',
-    'failures/webapps/DOMCore/tests/submissions/Opera',
     'failures/webapps/WebStorage/tests/submissions/Infraware',
     'failures/webapps/WebStorage/tests/submissions/Ms2ger',
     'failures/webapps/XMLHttpRequest/tests/submissions/Ms2ger'
 ]
 
 include('editing.mozbuild')
 include('html.mozbuild')
 include('webapps.mozbuild')
--- a/dom/imptests/webapps.mozbuild
+++ b/dom/imptests/webapps.mozbuild
@@ -1,9 +1,6 @@
 # THIS FILE IS AUTOGENERATED BY importTestSuites.py - DO NOT EDIT
 
 DIRS += [
-    'webapps/DOMCore/tests/approved',
-    'webapps/DOMCore/tests/submissions/Ms2ger',
-    'webapps/DOMCore/tests/submissions/Opera',
     'webapps/WebStorage/tests/submissions',
     'webapps/XMLHttpRequest/tests/submissions/Ms2ger',
 ]
--- a/dom/imptests/webapps.txt
+++ b/dom/imptests/webapps.txt
@@ -1,6 +1,3 @@
 hg|https://dvcs.w3.org/hg/webapps|webapps
-DOMCore/tests/approved
-DOMCore/tests/submissions/Ms2ger
-DOMCore/tests/submissions/Opera
 WebStorage/tests/submissions
 XMLHttpRequest/tests/submissions/Ms2ger
deleted file mode 100644
--- a/dom/imptests/webapps/DOMCore/tests/approved/Makefile.in
+++ /dev/null
@@ -1,32 +0,0 @@
-# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
-
-MOCHITEST_FILES := \
-  test_exceptions.html \
-  test_interfaces.html \
-  test_Node-compareDocumentPosition.html \
-  test_Node-contains.html \
-  test_Node-properties.html \
-  test_Range-cloneContents.html \
-  test_Range-cloneRange.html \
-  test_Range-collapse.html \
-  test_Range-commonAncestorContainer.html \
-  test_Range-compareBoundaryPoints.html \
-  test_Range-comparePoint.html \
-  test_Range-deleteContents.html \
-  test_Range-extractContents.html \
-  test_Range-insertNode.html \
-  test_Range-intersectsNode.html \
-  test_Range-isPointInRange.html \
-  test_Range-mutations.html \
-  test_Range-selectNode.html \
-  test_Range-set.html \
-  common.js \
-  Range-test-iframe.html \
-  $(NULL)
-
-# Temporarily disable on Windows for bug 875585 and deps
-ifneq (windows,$(MOZ_WIDGET_TOOLKIT))
-MOCHITEST_FILES += \
-  test_Range-surroundContents.html \
-  $(NULL)
-endif
deleted file mode 100644
--- a/dom/imptests/webapps/DOMCore/tests/approved/moz.build
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
-
-DIRS += [
-]
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in
+++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in
@@ -1,71 +0,0 @@
-# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
-
-MOCHITEST_FILES := \
-  test_attributes.html \
-  test_case.html \
-  test_CharacterData-appendData.html \
-  test_CharacterData-deleteData.html \
-  test_CharacterData-insertData.html \
-  test_CharacterData-remove.html \
-  test_CharacterData-replaceData.html \
-  test_Document-adoptNode.html \
-  test_Document-createComment.html \
-  test_Document-createElement.html \
-  test_Document-createElementNS.html \
-  test_Document-createEvent.html \
-  test_Document-createProcessingInstruction.html \
-  test_Document-createProcessingInstruction-literal-1.xhtml \
-  test_Document-createProcessingInstruction-literal-2.xhtml \
-  test_Document-createProcessingInstruction.xhtml \
-  test_Document-createTreeWalker.html \
-  test_Document-getElementById.html \
-  test_Document-getElementsByTagName.html \
-  test_Document-getElementsByTagNameNS.html \
-  test_Document-importNode.html \
-  test_DocumentType-remove.html \
-  test_DOMException-constants.html \
-  test_DOMImplementation-createDocument.html \
-  test_DOMImplementation-createDocumentType.html \
-  test_DOMImplementation-createHTMLDocument.html \
-  test_DOMImplementation-hasFeature.html \
-  test_Element-children.html \
-  test_Element-getElementsByClassName.html \
-  test_Element-remove.html \
-  test_Element-removeAttributeNS.html \
-  test_Element-tagName.html \
-  test_Event-constants.html \
-  test_Event-constructors.html \
-  test_Event-defaultPrevented.html \
-  test_Event-initEvent.html \
-  test_EventTarget-dispatchEvent.html \
-  test_Event-type.html \
-  test_historical.html \
-  test_interfaces.html \
-  test_Node-appendChild.html \
-  test_Node-cloneNode.html \
-  test_Node-constants.html \
-  test_Node-contains.xml \
-  test_Node-insertBefore.html \
-  test_Node-isEqualNode.xhtml \
-  test_Node-lookupPrefix.xhtml \
-  test_Node-nodeName.html \
-  test_Node-nodeName.xhtml \
-  test_Node-normalize.html \
-  test_Node-parentElement.html \
-  test_Node-parentNode.html \
-  test_Node-removeChild.html \
-  test_Node-replaceChild.html \
-  test_NodeFilter-constants.html \
-  test_Range-attributes.html \
-  test_Range-commonAncestorContainer.html \
-  test_Range-comparePoint.html \
-  test_Range-detach.html \
-  test_Range-intersectsNode-binding.html \
-  attributes.js \
-  case.js \
-  creators.js \
-  constants.js \
-  ChildNode-remove.js \
-  Document-createProcessingInstruction.js \
-  productions.js \
-  $(NULL)
deleted file mode 100644
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/moz.build
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
-
-DIRS += [
-]
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Opera/Makefile.in
+++ b/dom/imptests/webapps/DOMCore/tests/submissions/Opera/Makefile.in
@@ -1,22 +0,0 @@
-# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
-
-MOCHITEST_FILES := \
-  test_getElementsByClassName-01.htm \
-  test_getElementsByClassName-02.htm \
-  test_getElementsByClassName-03.htm \
-  test_getElementsByClassName-04.htm \
-  test_getElementsByClassName-05.htm \
-  test_getElementsByClassName-06.htm \
-  test_getElementsByClassName-07.htm \
-  test_getElementsByClassName-08.htm \
-  test_getElementsByClassName-09.htm \
-  test_getElementsByClassName-10.xml \
-  test_getElementsByClassName-11.xml \
-  test_getElementsByClassName-12.htm \
-  test_getElementsByClassName-13.htm \
-  test_getElementsByClassName-14.htm \
-  test_getElementsByClassName-15.htm \
-  test_getElementsByClassName-16.htm \
-  test_getElementsByClassName-17.htm \
-  test_getElementsByClassName-18.htm \
-  $(NULL)
deleted file mode 100644
--- a/dom/imptests/webapps/DOMCore/tests/submissions/Opera/moz.build
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
-
-DIRS += [
-]
--- a/testing/mochitest/android.json
+++ b/testing/mochitest/android.json
@@ -124,24 +124,24 @@
  "dom/browser-element/mochitest/test_browserElement_inproc_AppWindowNamespace.html": "TIMED_OUT, bug 783509",
  "dom/browser-element/mochitest/test_browserElement_inproc_SecurityChange.html": "TIMED_OUT, bug 766586",
  "dom/browser-element/mochitest/test_browserElement_inproc_CloseApp.html": "FAILS, bug 796982",
  "dom/devicestorage": "bug 781789 & bug 782275",
  "dom/imptests/editing/conformancetest/test_event.html": "",
  "dom/imptests/editing/conformancetest/test_runtest.html": "",
  "dom/imptests/editing/selecttest/test_addRange.html": "bug 775227",
  "dom/imptests/html/webgl": "WebGL",
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneContents.html": "bug 775227", 
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-compareBoundaryPoints.html": "bug 775227",
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-deleteContents.html": "bug 775227",
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-extractContents.html": "bug 775227",
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-insertNode.html": "bug 775227",
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-mutations.html": "bug 775227",
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-set.html": "bug 775227",
- "dom/imptests/webapps/DOMCore/tests/approved/test_Range-surroundContents.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-cloneContents.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-compareBoundaryPoints.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-deleteContents.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-extractContents.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-insertNode.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-mutations.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-set.html": "bug 775227",
+ "dom/imptests/html/dom/ranges/test_Range-surroundContents.html": "bug 775227",
  "dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_key.html": "bug 775227",
  "dom/indexedDB/ipc/test_ipc.html": "bug 783513",
  "dom/indexedDB/test/test_third_party.html": "TIMED_OUT",
  "dom/indexedDB/test/test_event_propagation.html": "TIMED_OUT, bug 780855",
  "dom/indexedDB/test/test_app_isolation_inproc.html": "TIMED_OUT",
  "dom/indexedDB/test/test_app_isolation_oop.html": "TIMED_OUT",
  "dom/indexedDB/test/test_webapp_clearBrowserData_inproc_inproc.html": "No test app installed",
  "dom/indexedDB/test/test_webapp_clearBrowserData_inproc_oop.html": "No test app installed",
--- a/testing/mochitest/b2g.json
+++ b/testing/mochitest/b2g.json
@@ -61,24 +61,24 @@
     "content/media/test/test_unseekable.html":"",
     "content/media/webaudio":"bug 916135",
     "content/media/webspeech/recognition/test/test_recognition_service_error.html": "timed out",
     "content/media/webspeech/synth/ipc/test/test_ipc.html": "comp.classes['@mozilla.org/special-powers-observer;1'] is undefined",
     "content/media/webspeech/synth/test/test_speech_queue.html": "Test timed out",
     "content/media/webspeech/synth/test/test_speech_simple.html": "Test timed out",
 
     "dom/imptests/editing/selecttest/test_addRange.html": "oom?, bug 775227",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-insertNode.html":"oom?, bug 775227",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-cloneContents.html":"",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-compareBoundaryPoints.html":"times out, bug 862196",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-deleteContents.html":"",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-extractContents.html":"",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-set.html":"",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-surroundContents.html":"",
-    "dom/imptests/webapps/DOMCore/tests/approved/test_Range-mutations.html":"Test timed out.",
+    "dom/imptests/html/dom/ranges/test_Range-insertNode.html":"oom?, bug 775227",
+    "dom/imptests/html/dom/ranges/test_Range-cloneContents.html":"",
+    "dom/imptests/html/dom/ranges/test_Range-compareBoundaryPoints.html":"times out, bug 862196",
+    "dom/imptests/html/dom/ranges/test_Range-deleteContents.html":"",
+    "dom/imptests/html/dom/ranges/test_Range-extractContents.html":"",
+    "dom/imptests/html/dom/ranges/test_Range-set.html":"",
+    "dom/imptests/html/dom/ranges/test_Range-surroundContents.html":"",
+    "dom/imptests/html/dom/ranges/test_Range-mutations.html":"Test timed out.",
     "dom/encoding/test/test_stringencoding.html":"Test timed out on b2g board",
 
     "content/events/test/test_bug615597.html":"bug 900969, 5 tests",
     "content/events/test/test_bug667919-1.html":"bug 900969, 5 tests",
     "content/events/test/test_bug667919-2.html":"bug 900969, 5 tests",
 
     "content/html/content/test/test_bug561636.html":"observerservice not working",
     "content/base/test/test_bug548193.html":"observerservice issue",