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

Side by Side Diff: LayoutTests/fast/loader/create-frame-in-DOMContentLoaded.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, 1 month 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 <head> 1 <head>
2 <script> 2 <script>
3 var frame; 3 var frame;
4 function print(message) 4 function print(message)
5 { 5 {
6 var line = document.createElement("div"); 6 var line = document.createElement("div");
7 line.appendChild(document.createTextNode(message)); 7 line.appendChild(document.createTextNode(message));
8 document.body.appendChild(line); 8 document.body.appendChild(line);
9 } 9 }
10 function handleDOMContentLoadedEvent() 10 function handleDOMContentLoadedEvent()
11 { 11 {
12 document.body.removeChild(document.body.firstChild); 12 document.body.removeChild(document.body.firstChild);
13 print("A) Entered DOMContentLoaded event handler function."); 13 print("A) Entered DOMContentLoaded event handler function.");
14 frame = document.createElement("iframe"); 14 frame = document.createElement("iframe");
15 document.body.appendChild(frame); 15 document.body.appendChild(frame);
16 print("B) Exiting DOMContentLoaded event handler function."); 16 print("B) Exiting DOMContentLoaded event handler function.");
17 if (window.testRunner)
18 testRunner.notifyDone();
17 } 19 }
18 function handleLoadEvent() 20 function handleLoadEvent()
19 { 21 {
20 print("C) Entered load event handler function."); 22 print("C) Entered load event handler function.");
21 document.body.removeChild(frame); 23 document.body.removeChild(frame);
22 print("D) Exiting load event handler function."); 24 print("D) Exiting load event handler function.");
23 print("Test passed if messages A, B, C, D were all in order and there was no crash."); 25 print("Test passed if messages A, B, C, D were all in order and there was no crash.");
24 } 26 }
25 if (window.testRunner) 27 if (window.testRunner) {
26 testRunner.dumpAsText(); 28 testRunner.dumpAsText();
29 testRunner.waitUntilDone();
30 }
27 addEventListener("load", handleLoadEvent); 31 addEventListener("load", handleLoadEvent);
28 addEventListener("DOMContentLoaded", handleDOMContentLoadedEvent); 32 addEventListener("DOMContentLoaded", handleDOMContentLoadedEvent);
29 </script> 33 </script>
30 </head> 34 </head>
31 <body>TEST DID NOT RUN YET</body> 35 <body>TEST DID NOT RUN YET</body>
OLDNEW
« no previous file with comments | « LayoutTests/fast/html/imports/import-destroy-stress.html ('k') | LayoutTests/fast/loader/external-script-URL-location.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698