| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 <body onload="test()"> | 5 <body onload="test()"> |
| 6 <div id="console"></div> | 6 <div id="console"></div> |
| 7 <script> | 7 <script> |
| 8 if (window.testRunner) { | 8 if (window.testRunner) { |
| 9 testRunner.waitUntilDone(); | 9 testRunner.waitUntilDone(); |
| 10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
| 11 } | 11 } |
| 12 | 12 |
| 13 function test() | 13 function test() |
| 14 { | 14 { |
| 15 var s = document.createElement("script"); | 15 var s = document.createElement("script"); |
| 16 s.addEventListener("beforeload", function() { | 16 s.addEventListener("beforeload", function() { |
| 17 document.body.removeChild(document.getElementsByTagName("script")[2]); | 17 document.body.removeChild(document.getElementsByTagName("script")[2]); |
| 18 testPassed(""); | 18 testPassed(""); |
| 19 if (window.testRunner) | 19 if (window.testRunner) |
| 20 testRunner.notifyDone(); | 20 testRunner.notifyDone(); |
| 21 }, false); | 21 }, false); |
| 22 s.addEventListener("error", function() { | 22 s.addEventListener("error", function() { |
| 23 testFailed("error event should not fire.") | 23 testFailed("error event should not fire.") |
| 24 }, false); | 24 }, false); |
| 25 s.addEventListener("load", function() { | 25 s.addEventListener("load", function() { |
| 26 testFailed("load event should not fire.") | 26 testFailed("load event should not fire.") |
| 27 }, false); | 27 }, false); |
| 28 s.src = "resources/shouldnotexecute.js"; | 28 s.src = "resources/shouldnotexecute.js"; |
| 29 document.body.appendChild(s); | 29 document.body.appendChild(s); |
| 30 } | 30 } |
| 31 </script> | 31 </script> |
| 32 </body> | 32 </body> |
| 33 </html> | 33 </html> |
| OLD | NEW |