Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / create-frame-in-DOMContentLoaded.html
blob8aa074c472fc8d2a60f40ac5d9b84df2d78245fe
1 <head>
2 <script>
3 var frame;
4 function print(message)
6 var line = document.createElement("div");
7 line.appendChild(document.createTextNode(message));
8 document.body.appendChild(line);
10 function handleDOMContentLoadedEvent()
12 document.body.removeChild(document.body.firstChild);
13 print("A) Entered DOMContentLoaded event handler function.");
14 frame = document.createElement("iframe");
15 document.body.appendChild(frame);
16 print("B) Exiting DOMContentLoaded event handler function.");
17 if (window.testRunner)
18 testRunner.notifyDone();
20 function handleLoadEvent()
22 print("C) Entered load event handler function.");
23 document.body.removeChild(frame);
24 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.");
27 if (window.testRunner) {
28 testRunner.dumpAsText();
29 testRunner.waitUntilDone();
31 addEventListener("load", handleLoadEvent);
32 addEventListener("DOMContentLoaded", handleDOMContentLoadedEvent);
33 </script>
34 </head>
35 <body>TEST DID NOT RUN YET</body>