summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype.html
blob: 95990cf241c014949ccc186fcb14a18776f14583 (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
<body>
<script>
if (window.layoutTestController) {
    layoutTestController.dumpAsText();
    layoutTestController.waitUntilDone();
}

function gc()
{
    if (window.GCController)
        return GCController.collect();

    for (var i = 0; i < 10000; i++)
        var s = new String("");
}

// Reload multiple times, to make crashing more likely.
var iterationsLeft = 50;
function test()
{
    if (--iterationsLeft) {
        frames[0].history.go(0);
    } else {
        gc();
        document.getElementById("result").innerText = frames[0].document.body.textContent;
        if (window.layoutTestController)
            layoutTestController.notifyDone();
    }
}
</script>
<div id="result">FAIL</div>
<iframe src="resources/createDocument-with-used-doctype-frame.html" onload="test()"></iframe>
</body>