summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/insertedIntoDocument-iframe.html
blob: e22922fd4343a5e3d6c61c827c421f3fbafa15f3 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

gc = window.gc || function()
{
    if (window.GCController)
        return GCController.collect();
    
    for (var i = 0; i < 10000; ++i)
        var s = new String("AAAA");
}

window.onload = function()
{
    parent = document.createElement("div");
    parent.innerHTML = "<iframe></iframe><element id='element'/>";

    iframe = parent.firstChild;
    iframe.src = "javascript:top.document.body.removeChild(top.parent)";
    
    document.body.appendChild(parent);

    parent = iframe = null;
    gc();
    
    setTimeout(finishTest, 0);
}

finishTest = function()
{
    document.getElementById("element");
    
    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
</head>
<body>PASS</body>
</html>