Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / parser / scriptexec-during-parserInsertBefore.html
blob4e5a4db131380945ff4fadf31928e639ef7231fe
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <body>
4 <div><i></i><table><b><p><iframe></iframe><script>
5 /*
6 The adoption agency algorithm, step 10, will end up calling
7 ContainerNode::parserInsertBefore with the following arguments:
9 |this| == <div>
10 |newChild| == <p>
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>
25 <script>
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");
29 </script>
30 </body>