eric@webkit.org | c2e395c | 2010-06-14 16:27:10 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <script> |
| 4 | function log(message) |
| 5 | { |
| 6 | document.getElementById("result").innerHTML += message + "<br>"; |
| 7 | } |
| 8 | |
| 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") |
| 13 | |
| 14 | document.getElementsByTagName("head")[0].appendChild(s); |
| 15 | } |
| 16 | |
| 17 | jsLoaded = false; |
| 18 | runningModal = false; |
| 19 | |
| 20 | // This line will load external script into memory. |
| 21 | loadJSFile(); |
| 22 | |
| 23 | function runModal() |
| 24 | { |
| 25 | jsLoaded = true; |
| 26 | loadJSFile(); |
| 27 | |
| 28 | runningModal = true; |
| 29 | alert("Scripts should not be running in the background!"); |
| 30 | runningModal = false; |
| 31 | } |
| 32 | </script> |
| 33 | </head> |
| 34 | |
| 35 | <body> |
| 36 | |
| 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> |
| 42 | |
| 43 | </body> |
| 44 | </html> |