1 <html> 2 <head> 3 <script type="text/javascript"> 4 function log(message) 5 { 6 var item = document.createElement("li"); 7 item.appendChild(document.createTextNode(message)); 8 document.getElementById("console").appendChild(item); 9 } 10 function done() 11 { 12 log("TEST PASSED."); 13 if (window.layoutTestController) 14 layoutTestController.notifyDone(); 15 } 16 if (window.layoutTestController) { 17 layoutTestController.dumpAsText(); 18 layoutTestController.waitUntilDone(); 19 } 20 </script> 21 </head> 22 <body> 23 <p>This tests that onload events can be attached to link elements with rel=prefetch. Since prefetch links are just there as a performance optimization, the onload event is their only programatic side-effect.</p> 24 <p>If it works you should see a message below saying the test has passed.</p> 25 <link href="prefetch.link" rel="prefetch" onload="done()" > 26 <hr> 27 <p><ol id="console"></ol></p> 28 </body> 29 </html> 30