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

Side by Side Diff: LayoutTests/http/tests/svg/tref-adoptNode-crash.html

Issue 561813003: Prepare blink to unify definitions of load completion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add document.close() to scroll-left-while-loading.html Created 6 years, 2 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 <script> 1 <script>
2 // Test passes if it does not crash. 2 // Test passes if it does not crash.
3 // Note: this test is located under Layouttests/http in order to load an externa l 3 // Note: this test is located under Layouttests/http in order to load an externa l
4 // document (svg-tref.svg) and modify it without hitting security restrict ions. 4 // document (svg-tref.svg) and modify it without hitting security restrict ions.
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 } 8 }
9 9
10 function crash() { 10 function crash() {
11 q = document.getElementById('root').contentDocument; 11 q = document.getElementById('root').contentDocument;
12 var z = document.lastChild; 12 var z = document.lastChild;
13 q.adoptNode( z ); 13 q.adoptNode( z );
14 e = document.importNode( q.firstChild, true ); 14 e = document.importNode( q.firstChild, true );
15 q.adoptNode( e ); 15 q.adoptNode( e );
16 r = document.createRange(); 16 r = document.createRange();
17 r.surroundContents( e ); 17 r.surroundContents( e );
18 e.id = 's'; 18 e.id = 's';
19 document.write("If this text is visible and the test did not crash, this test passes"); 19 document.write("If this text is visible and the test did not crash, this test passes");
20 document.close();
20 if (window.testRunner) 21 if (window.testRunner)
21 testRunner.notifyDone(); 22 testRunner.notifyDone();
22 } 23 }
23 </script> 24 </script>
24 <object data="http://127.0.0.1:8000/svg/resources/svg-tref.svg" id="root" onload ="crash()"/> 25 <object data="http://127.0.0.1:8000/svg/resources/svg-tref.svg" id="root" onload ="crash()"/>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698