Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: LayoutTests/fast/dom/node-move-to-new-document-crash-main.html

Issue 22875013: Make several DOMImplementation API arguments mandatory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix createDocument() args Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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(null, '');
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698