2 <script src=
"../../resources/js-test.js"></script>
4 <b><p><iframe src=
"javascript:onunload = function() {
6 top.container = document.createElement('div');
7 top.container.appendChild(frameElement.parentNode);
9 }"></iframe></b></p><!-- This order is intentional to force reparenting of iframe -->
11 description("Ensure that iframe onunload event handler triggered during reparenting that modifies the reparented DOM doesn't corrupt DOM.")
12 var iframe
= document
.querySelector("iframe");
13 shouldBe("iframe", "iframe.parentNode.firstChild");
14 var parentNode
= iframe
.parentNode
;
15 shouldBe("parentNode", "parentNode.parentNode.firstChild");