2 <script src=
"../../resources/js-test.js"></script>
4 <div><i></i><table><b><p><iframe></iframe><script>
6 The adoption agency algorithm, step 10, will end up calling
7 ContainerNode::parserInsertBefore with the following arguments:
11 |nextChild| == <table>
13 parserInsertBefore calls parserRemoveChild(newChild), which
14 triggers the unload event in the contained iframe.
17 var containerNode
= document
.querySelector("div");
18 var firstChild
= document
.querySelector("i");
19 var nextChild
= document
.querySelector("table");
21 frames
[0].onunload = function() {
22 containerNode
.removeChild(nextChild
);
24 </script></b></p><!--This order is intentional to force reparenting--></table></div>
26 description("Ensure that DOM is consistent after a specific child has been removed during reparenting.")
27 shouldBe("containerNode.firstChild", "firstChild");
28 shouldBe("nextChild.previousSibling", "null");