| Index: LayoutTests/fast/parser/scriptexec-during-parserInsertBefore.html
|
| diff --git a/LayoutTests/fast/parser/scriptexec-during-parserInsertBefore.html b/LayoutTests/fast/parser/scriptexec-during-parserInsertBefore.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4e5a4db131380945ff4fadf31928e639ef7231fe
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/parser/scriptexec-during-parserInsertBefore.html
|
| @@ -0,0 +1,30 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<body>
|
| +<div><i></i><table><b><p><iframe></iframe><script>
|
| +/*
|
| +The adoption agency algorithm, step 10, will end up calling
|
| +ContainerNode::parserInsertBefore with the following arguments:
|
| +
|
| +|this| == <div>
|
| +|newChild| == <p>
|
| +|nextChild| == <table>
|
| +
|
| +parserInsertBefore calls parserRemoveChild(newChild), which
|
| +triggers the unload event in the contained iframe.
|
| +*/
|
| +
|
| +var containerNode = document.querySelector("div");
|
| +var firstChild = document.querySelector("i");
|
| +var nextChild = document.querySelector("table");
|
| +
|
| +frames[0].onunload = function() {
|
| + containerNode.removeChild(nextChild);
|
| +}
|
| +</script></b></p><!--This order is intentional to force reparenting--></table></div>
|
| +<script>
|
| +description("Ensure that DOM is consistent after a specific child has been removed during reparenting.")
|
| +shouldBe("containerNode.firstChild", "firstChild");
|
| +shouldBe("nextChild.previousSibling", "null");
|
| +</script>
|
| +</body>
|
|
|