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

Side by Side Diff: LayoutTests/fast/loader/create-frame-in-DOMContentLoaded.html

Issue 679863002: Revert "Prepare blink to unify definitions of load completion" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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();
19 } 17 }
20 function handleLoadEvent() 18 function handleLoadEvent()
21 { 19 {
22 print("C) Entered load event handler function."); 20 print("C) Entered load event handler function.");
23 document.body.removeChild(frame); 21 document.body.removeChild(frame);
24 print("D) Exiting load event handler function."); 22 print("D) Exiting load event handler function.");
25 print("Test passed if messages A, B, C, D were all in order and there was no crash."); 23 print("Test passed if messages A, B, C, D were all in order and there was no crash.");
26 } 24 }
27 if (window.testRunner) { 25 if (window.testRunner)
28 testRunner.dumpAsText(); 26 testRunner.dumpAsText();
29 testRunner.waitUntilDone();
30 }
31 addEventListener("load", handleLoadEvent); 27 addEventListener("load", handleLoadEvent);
32 addEventListener("DOMContentLoaded", handleDOMContentLoadedEvent); 28 addEventListener("DOMContentLoaded", handleDOMContentLoadedEvent);
33 </script> 29 </script>
34 </head> 30 </head>
35 <body>TEST DID NOT RUN YET</body> 31 <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