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