Summary

Harness status: OK

Found 29 tests

Details

ResultTest NameMessage
PassIf node is a host-including inclusive ancestor of parent, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc.body, doc.body)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:19:5)
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc.body, doc.documentElement)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:20:5)
PassIf node is not a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction, or Comment node, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc, doc2)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:27:5)
PassIf node is a Text node and parent is a document, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc, doc.createTextNode("text"))")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:33:5)
PassIf node is a doctype and parent is not a document, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc.createElement("a"), doctype)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:40:5)
PassIf node is a DocumentFragment with multiple elements and parent is a document, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc, df)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:50:5)
PassIf node is a DocumentFragment with an element and parent is a document with another element, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc, df)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:58:5)
PassIf node is an Element and parent is a document with another element, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc, el)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:65:5)
PassIf node is a doctype and parent is a document with another doctype, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc, doctype)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:73:5)
PassIf node is a doctype and parent is a document with an element, then throw a HierarchyRequestError DOMException.
Asserts run
Pass
assert_throws_dom("HierarchyRequestError", function "() => insert(doc, doctype)")
    at Test.<anonymous> ( /dom/nodes/pre-insertion-validation-hierarchy.js:83:7)
PassElement.replaceChildren() without any argument, on a parent having no child.
Asserts run
Pass
assert_array_equals(object "[object NodeList]", [])
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:15:7)
PassElement.replaceChildren() with null as an argument, on a parent having no child.
Asserts run
Pass
assert_equals("null", "null")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:21:7)
PassElement.replaceChildren() with undefined as an argument, on a parent having no child.
Asserts run
Pass
assert_equals("undefined", "undefined")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:27:7)
PassElement.replaceChildren() with only text as an argument, on a parent having no child.
Asserts run
Pass
assert_equals("text", "text")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:33:7)
PassElement.replaceChildren() with only one element as an argument, on a parent having no child.
Asserts run
Pass
assert_array_equals(object "[object NodeList]", [Element node <x></x>])
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:40:7)
PassElement.replaceChildren() without any argument, on a parent having a child.
Asserts run
Pass
assert_array_equals(object "[object NodeList]", [])
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:48:7)
PassElement.replaceChildren() with null as an argument, on a parent having a child.
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:56:7)
Pass
assert_equals("null", "null")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:57:7)
PassElement.replaceChildren() with one element and text as argument, on a parent having a child.
Asserts run
Pass
assert_equals(2, 2)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:66:7)
Pass
assert_equals(Element node <x></x>, Element node <x></x>)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:67:7)
Pass
assert_equals("text", "text")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:68:7)
PassElement.replaceChildren() should move nodes in the right order
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:90:11)
Pass
assert_equals(2, 2)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:91:11)
Pass
assert_equals("childList", "childList")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:93:13)
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:94:13)
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:95:13)
Pass
assert_equals(Element node <test1></test1>, Element node <test1></test1>)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:96:13)
Pass
assert_equals("childList", "childList")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:93:13)
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:94:13)
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:95:13)
Pass
assert_equals(Element node <test2></test2>, Element node <test2></test2>)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:96:13)
Pass
assert_equals(1, 1, "phase")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:105:11)
Pass
assert_equals(1, 1, "mutations.length")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:106:11)
Pass
assert_equals("childList", "childList", "mutation.type")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:108:11)
Pass
assert_equals(2, 2, "added nodes length")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:109:11)
Pass
assert_array_equals([Element node <test1></test1>, Element node <test2></test2>], [Element node <test1></test1>, Element node <test2></test2>], "added nodes")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:110:11)
Pass
assert_equals(2, 2, "removed nodes length")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:111:11)
Pass
assert_array_equals([Element node <test3></test3>, Element node <test4></test4>], [Element node <test3></test3>, Element node <test4></test4>], "removed nodes")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:112:11)
PassDocumentFragment.replaceChildren() without any argument, on a parent having no child.
Asserts run
Pass
assert_array_equals(object "[object NodeList]", [])
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:15:7)
PassDocumentFragment.replaceChildren() with null as an argument, on a parent having no child.
Asserts run
Pass
assert_equals("null", "null")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:21:7)
PassDocumentFragment.replaceChildren() with undefined as an argument, on a parent having no child.
Asserts run
Pass
assert_equals("undefined", "undefined")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:27:7)
PassDocumentFragment.replaceChildren() with only text as an argument, on a parent having no child.
Asserts run
Pass
assert_equals("text", "text")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:33:7)
PassDocumentFragment.replaceChildren() with only one element as an argument, on a parent having no child.
Asserts run
Pass
assert_array_equals(object "[object NodeList]", [Element node <x></x>])
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:40:7)
PassDocumentFragment.replaceChildren() without any argument, on a parent having a child.
Asserts run
Pass
assert_array_equals(object "[object NodeList]", [])
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:48:7)
PassDocumentFragment.replaceChildren() with null as an argument, on a parent having a child.
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:56:7)
Pass
assert_equals("null", "null")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:57:7)
PassDocumentFragment.replaceChildren() with one element and text as argument, on a parent having a child.
Asserts run
Pass
assert_equals(2, 2)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:66:7)
Pass
assert_equals(Element node <x></x>, Element node <x></x>)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:67:7)
Pass
assert_equals("text", "text")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:68:7)
PassDocumentFragment.replaceChildren() should move nodes in the right order
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:90:11)
Pass
assert_equals(2, 2)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:91:11)
Pass
assert_equals("childList", "childList")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:93:13)
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:94:13)
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:95:13)
Pass
assert_equals(Element node <test1></test1>, Element node <test1></test1>)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:96:13)
Pass
assert_equals("childList", "childList")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:93:13)
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:94:13)
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:95:13)
Pass
assert_equals(Element node <test2></test2>, Element node <test2></test2>)
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:96:13)
Pass
assert_equals(1, 1, "phase")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:105:11)
Pass
assert_equals(1, 1, "mutations.length")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:106:11)
Pass
assert_equals("childList", "childList", "mutation.type")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:108:11)
Pass
assert_equals(2, 2, "added nodes length")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:109:11)
Pass
assert_array_equals([Element node <test1></test1>, Element node <test2></test2>], [Element node <test1></test1>, Element node <test2></test2>], "added nodes")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:110:11)
Pass
assert_equals(2, 2, "removed nodes length")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:111:11)
Pass
assert_array_equals([Element node <test3></test3>, Element node <test4></test4>], [Element node <test3></test3>, Element node <test4></test4>], "removed nodes")
    at Test.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:112:11)
Pass
assert_equals(2, 2, "mutations.length")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:135:7)
Pass
assert_equals("a", "a", "Target of the removal")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:137:7)
Pass
assert_equals(0, 0, "Should not have added nodes")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:138:7)
Pass
assert_equals(1, 1, "Should have 1 removed node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:139:7)
Pass
assert_equals(Text node "text", Text node "text", "Should have removed txt node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:140:7)
Pass
assert_equals("b", "b", "Target of the replaceChildren")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:142:7)
Pass
assert_equals(1, 1, "Should have removed 1 node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:143:7)
Pass
assert_equals(Text node "text2", Text node "text2", "Should have removed txt2 node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:144:7)
Pass
assert_equals(1, 1, "Should have added a node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:145:7)
Pass
assert_equals(Text node "text", Text node "text", "Should have added txt node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:146:7)
Pass
assert_equals(3, 3, "mutations.length")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:173:7)
Pass
assert_equals("a", "a", "Target of the removal")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:175:7)
Pass
assert_equals(0, 0, "Should not have added nodes")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:176:7)
Pass
assert_equals(1, 1, "Should have 1 removed node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:177:7)
Pass
assert_equals(Element node <div id="c"></div>, Element node <div id="c"></div>, "Should have removed c node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:178:7)
Pass
assert_equals("a", "a", "Target of the removal")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:180:7)
Pass
assert_equals(0, 0, "Should not have added nodes")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:181:7)
Pass
assert_equals(1, 1, "Should have 1 removed node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:182:7)
Pass
assert_equals(Text node "text", Text node "text", "Should have removed txt node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:183:7)
Pass
assert_equals("b", "b", "Target of the replaceChildren")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:185:7)
Pass
assert_equals(1, 1, "Should have removed 1 node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:186:7)
Pass
assert_equals(Text node "text2", Text node "text2", "Should have removed txt2 node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:187:7)
Pass
assert_equals(2, 2, "Should have added a node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:188:7)
Pass
assert_equals(Element node <div id="c"></div>, Element node <div id="c"></div>, "Should have added c node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:189:7)
Pass
assert_equals(Text node "text", Text node "text", "Should have added txt node")
    at MutationObserver.<anonymous> ( /dom/nodes/ParentNode-replaceChildren.html:190:7)
PassThere should be a MutationRecord for the node removed from another parent node.
Asserts runNo asserts ran
PassThere should be MutationRecords for the nodes removed from another parent node.
Asserts runNo asserts ran