summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/frames/remove-frame-with-scrollbars-crash.html
blob: 6e683f94196d76306a9d38cf0608121fe601680e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<p>This test checks for a crash when removing an iframe with scrollbars from a document. See &lt;rdar://problem/5061807&gt;.</p>
<p>If the test passes, you'll see a PASS message below.</p>
<hr>
<pre id="console"></pre>
<iframe id="iframe" src="data:text/html,<body style='overflow-x: hidden'><div style='height:1000px'</body>" style="width:152px; height:300px"></iframe>

<script>
function log(s)
{
    document.getElementById("console").appendChild(document.createTextNode(s));
}

var iframe = document.getElementById("iframe");

function destroyIframe()
{
    iframe.parentNode.removeChild(iframe);
    log("PASS: Yout didn't crash.");
    layoutTestController.notifyDone();
}

iframe.onload = function() { setTimeout(destroyIframe, 0); }
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
</script>