| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="/js-test-resources/js-test.js"></script> | 4 <script src="/js-test-resources/js-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function loadScript(url, async, onload, onerror) { | 6 function loadScript(url, async, onload, onerror) { |
| 7 var script = document.createElement("script"); | 7 var script = document.createElement("script"); |
| 8 script.async = async; | 8 script.async = async; |
| 9 script.onload = onload; | 9 script.onload = onload; |
| 10 if (onerror) | 10 if (onerror) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 secondOnErrorHandlerHasRun = true; | 42 secondOnErrorHandlerHasRun = true; |
| 43 loadScript("resources/success.js?2", true, finishJSTest); | 43 loadScript("resources/success.js?2", true, finishJSTest); |
| 44 } | 44 } |
| 45 | 45 |
| 46 function unexpectedLoad() { | 46 function unexpectedLoad() { |
| 47 testFailed("Script should not have loaded"); | 47 testFailed("Script should not have loaded"); |
| 48 finishJSTest(); | 48 finishJSTest(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 loadScript("resources/success.js?3", false); | 51 loadScript("resources/success.js?3", false); |
| 52 loadScript("resources/slow-nonexisting-script.php?sleep=1", false, unexpectedLoa
d, failedFirst); | 52 loadScript("resources/slow-nonexisting-script.php?timeout=1", false, unexpectedL
oad, failedFirst); |
| 53 loadScript("resources/slow-nonexisting-script.php?sleep=2", false, unexpectedLoa
d, failedSecond); | 53 loadScript("resources/slow-nonexisting-script.php?timeout=2", false, unexpectedL
oad, failedSecond); |
| 54 </script> | 54 </script> |
| 55 </body> | 55 </body> |
| 56 </html> | 56 </html> |
| OLD | NEW |