| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <body> | 2 <body> |
| 3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../js/resources/js-test-pre.js"></script> |
| 4 <script> | 4 <script> |
| 5 description("Tests that moving nodes across documents does not crash."); | 5 description("Tests that moving nodes across documents does not crash."); |
| 6 | 6 |
| 7 if (window.testRunner) { | 7 if (window.testRunner) { |
| 8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
| 9 testRunner.waitUntilDone(); | 9 testRunner.waitUntilDone(); |
| 10 } | 10 } |
| 11 | 11 |
| 12 function runTest() | 12 function runTest() |
| 13 { | 13 { |
| 14 root = document.getElementById('root').contentDocument; | 14 root = document.getElementById('root').contentDocument; |
| 15 test = root.getElementById('test'); | 15 test = root.getElementById('test'); |
| 16 var doc = document.implementation.createDocument(); | 16 var doc = document.implementation.createDocument('', ''); |
| 17 doc.adoptNode(test); | 17 doc.adoptNode(test); |
| 18 test.appendChild(root.getElementById('svg').cloneNode(0)); | 18 test.appendChild(root.getElementById('svg').cloneNode(0)); |
| 19 document.open(); | 19 document.open(); |
| 20 document.write('PASS'); | 20 document.write('PASS'); |
| 21 document.close(); | 21 document.close(); |
| 22 setTimeout('finish();', 0); | 22 setTimeout('finish();', 0); |
| 23 } | 23 } |
| 24 | 24 |
| 25 function finish() | 25 function finish() |
| 26 { | 26 { |
| 27 gc(); | 27 gc(); |
| 28 document.adoptNode(test); | 28 document.adoptNode(test); |
| 29 if (window.testRunner) | 29 if (window.testRunner) |
| 30 testRunner.notifyDone(); | 30 testRunner.notifyDone(); |
| 31 } | 31 } |
| 32 </script> | 32 </script> |
| 33 <object data="resources/node-move-to-new-document-crash.svg" id="root" onload="r
unTest()"/></object> | 33 <object data="resources/node-move-to-new-document-crash.svg" id="root" onload="r
unTest()"/></object> |
| 34 <script src="../js/resources/js-test-post.js"></script> | 34 <script src="../js/resources/js-test-post.js"></script> |
| 35 </body> | 35 </body> |
| 36 </html> | 36 </html> |
| OLD | NEW |