diff options
author | Steve Block <steveblock@google.com> | 2011-05-20 16:21:44 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-05-24 14:11:39 +0100 |
commit | abd0b16f66097fb5317221db993dafb6bd965965 (patch) | |
tree | 35a99efae402a25abc6b82c3959d958b952ec6bb /LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html | |
parent | 10b539940b83c9b7ea6a6ebcf8707d9841b4284f (diff) | |
download | external_webkit-abd0b16f66097fb5317221db993dafb6bd965965.zip external_webkit-abd0b16f66097fb5317221db993dafb6bd965965.tar.gz external_webkit-abd0b16f66097fb5317221db993dafb6bd965965.tar.bz2 |
Add LayoutTests/fast/dom/HTMLLinkElement at r76408
Bug: 2268353
Change-Id: I3c351413cb223af72621b9b9f0336fc66a3d4fbc
Diffstat (limited to 'LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html')
-rw-r--r-- | LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html b/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html new file mode 100644 index 0000000..594eafd --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html @@ -0,0 +1,39 @@ +<html> +<body> +<script> +function log(message) +{ + var item = document.createElement("li"); + item.appendChild(document.createTextNode(message)); + document.getElementById("console").appendChild(item); +} + +nick_load_count = 0 + +function nick_onload() +{ + log("NICK_ONLOAD called"); + ++nick_load_count; + if (nick_load_count == 2) { + log("SUCCESS. Two loads."); + layoutTestController.notifyDone(); + } +} + +if (window.layoutTestController) { + layoutTestController.waitUntilDone(); + layoutTestController.dumpAsText(); + layoutTestController.dumpResourceResponseMIMETypes(); +} +</script> +<p>This test verifies that an image which is prefetched, and which is also contained as a +subresource of the current document can be loaded correctly as a subresource. See +bug 49236 in which this wasn't working. +<p>When this test succeeds, you'll see an image of Nick on a sailboat immediately below +this text. When this test fails, you will see no images at all. +<link rel="prefetch" href="resources/nick.jpg" onload="nick_onload()" /> +<img src="resources/nick.jpg" onload="nick_onload()" /> +<hr> +<p><ol id="console"></ol></p> +</body></html> + |