summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/node-move-to-new-document-crash-main.html
blob: 651fc293b6116a8c1adf4fab260bd56b6c73fc93 (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
<html>
<body>
<script src="../js/resources/js-test-pre.js"></script>
<script>
description("Tests that moving nodes across documents does not crash.");

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function runTest()
{
    root = document.getElementById('root').contentDocument;
    test = root.getElementById('test');
    var doc = document.implementation.createDocument(null, '');
    doc.adoptNode(test);
    test.appendChild(root.getElementById('svg').cloneNode(0));
    document.open();
    document.write('PASS');
    document.close();
    setTimeout('finish();', 0);
}

function finish()
{
    gc();
    document.adoptNode(test);
    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
<object data="resources/node-move-to-new-document-crash.svg" id="root" onload="runTest()"/></object>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>