summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/parser/scriptexec-during-parserRemoveChild.html
blob: c27495d916570dbf06a7dbf2345533c61c6e48d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<body>
<b><p><iframe src="javascript:onunload = function() {
        if(!top.container) {
            top.container = document.createElement('div');
            top.container.appendChild(frameElement.parentNode);
        }
}"></iframe></b></p><!-- This order is intentional to force reparenting of iframe -->
<script>
description("Ensure that iframe onunload event handler triggered during reparenting that modifies the reparented DOM doesn't corrupt DOM.")
var iframe = document.querySelector("iframe");
shouldBe("iframe", "iframe.parentNode.firstChild");
var parentNode = iframe.parentNode;
shouldBe("parentNode", "parentNode.parentNode.firstChild");
</script>
</body>