<html> <head> <script type="text/javascript"> function log(message) { var item = document.createElement("li"); item.appendChild(document.createTextNode(message)); document.getElementById("console").appendChild(item); } function done() { log("TEST PASSED."); if (window.layoutTestController) layoutTestController.notifyDone(); } if (window.layoutTestController) { layoutTestController.dumpAsText(); layoutTestController.waitUntilDone(); } </script> </head> <body> <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> <p>If it works you should see a message below saying the test has passed.</p> <link href="prefetch.link" rel="prefetch" onload="done()" > <hr> <p><ol id="console"></ol></p> </body> </html>