Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / load-deferrer-script-element.html
blobc0ad77357f6e95afe7ed538c34c819ec38aa5308
1 <html>
2 <head>
3 <script>
4 function log(message)
6 document.getElementById("result").innerHTML += message + "<br>";
9 function loadJSFile(){
10 var s = document.createElement('script')
11 s.setAttribute("type", "text/javascript")
12 s.setAttribute("src", "resources/load-deferrer-script-element.js")
14 document.getElementsByTagName("head")[0].appendChild(s);
17 jsLoaded = false;
18 runningModal = false;
20 // This line will load external script into memory.
21 loadJSFile();
23 function runModal()
25 jsLoaded = true;
26 loadJSFile();
28 runningModal = true;
29 alert("Scripts should not be running in the background!");
30 runningModal = false;
32 </script>
33 </head>
35 <body>
37 <p>This tests the bug https://bugs.webkit.org/show_bug.cgi?id=38910.
38 Click the button, wait 5 seconds and close it.
39 The test passes if no error messages show up in the page!</p>
40 <input id="button" type="button" value="click me" onclick="runModal()"/>
41 <p id="result"></p>
43 </body>
44 </html>