summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html')
-rw-r--r--LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html
new file mode 100644
index 0000000..37cfdbf
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html
@@ -0,0 +1,29 @@
+<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>