OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 <script type="text/javascript"> | 4 <script type="text/javascript"> |
5 function done() | 5 function done() |
6 { | 6 { |
7 testPassed('onerror was called'); | 7 testPassed('onerror was called'); |
8 if (window.testRunner) | 8 if (window.testRunner) |
9 testRunner.notifyDone(); | 9 testRunner.notifyDone(); |
10 } | 10 } |
11 if (window.testRunner) { | 11 if (window.testRunner) { |
12 testRunner.dumpAsText(); | 12 testRunner.dumpAsText(); |
13 testRunner.waitUntilDone(); | 13 testRunner.waitUntilDone(); |
14 } | 14 } |
15 </script> | 15 </script> |
16 </head> | 16 </head> |
17 <body> | 17 <body> |
18 <p>This tests that onerror events can be attached to link elements with rel=pref
etch. Since prefetch links are just there as a performance optimization, the one
rror/onload event is their only programatic side-effect.</p> | 18 <p>This tests that onerror events can be attached to link elements with rel=pref
etch. Since prefetch links are just there as a performance optimization, the one
rror/onload event is their only programatic side-effect.</p> |
19 <p>If it works you should see a message below saying the test has passed.</p> | 19 <p>If it works you should see a message below saying the test has passed.</p> |
20 <link href="prefetch-noexisty.link" rel="prefetch" onload="testFailed('onload ev
ent should not occur')" onerror="done()"> | 20 <link href="prefetch-noexisty.link" rel="prefetch" onload="testFailed('onload ev
ent should not occur')" onerror="done()"> |
21 <hr> | 21 <hr> |
22 <div id="console"></div> | 22 <div id="console"></div> |
23 </body> | 23 </body> |
24 </html> | 24 </html> |
25 | 25 |
OLD | NEW |