OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script> |
| 6 function syncLoad(url, onload) { |
| 7 var script = document.createElement("script"); |
| 8 script.async = false; |
| 9 script.onload = onload; |
| 10 script.src = url; |
| 11 document.head.appendChild(script); |
| 12 } |
| 13 </script> |
| 14 </head> |
| 15 <body> |
| 16 <script> |
| 17 description("Sync scripts that fail to load should not block later sync scripts
from executing."); |
| 18 |
| 19 window.jsTestIsAsync = true; |
| 20 |
| 21 if (window.testRunner) { |
| 22 testRunner.dumpAsText(); |
| 23 testRunner.waitUntilDone(); |
| 24 } |
| 25 |
| 26 function nonExistentJS() { |
| 27 return "http://localhost/non-existing-" + Math.random() + ".js"; |
| 28 } |
| 29 |
| 30 for (var i = 0; i < 10; ++i) |
| 31 syncLoad(nonExistentJS()); |
| 32 |
| 33 syncLoad("resources/success.js", finishJSTest); |
| 34 </script> |
| 35 </body> |
| 36 </html> |
OLD | NEW |