Home | History | Annotate | Download | only in HTMLLinkElement
      1 <html>
      2 <head>
      3 <script src="../../js/resources/js-test-pre.js"></script>
      4 <script type="text/javascript">
      5 function done()
      6 {
      7     testPassed('onerror was called');
      8     if (window.layoutTestController)
      9         layoutTestController.notifyDone();
     10 }
     11 if (window.layoutTestController) {
     12     layoutTestController.dumpAsText();
     13     layoutTestController.waitUntilDone();
     14 }
     15 </script>
     16 </head>
     17 <body>
     18 <p>This tests that onerror events can be attached to link elements with rel=prefetch. Since prefetch links are just there as a performance optimization, the onerror/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>
     20 <link href="prefetch-noexisty.link" rel="prefetch" onload="testFailed('onload event should not occur')" onerror="done()">
     21 <hr>
     22 <div id="console"></div>
     23 </body>
     24 </html>
     25 
     26