Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLLinkElement / link-and-subresource-test-nonexistent.html
blob874e993a2d1d7e8bc98ce35d614e50af76735b9e
1 <html>
2 <body>
3 <script>
4 function log(message)
6 var item = document.createElement("li");
7 item.appendChild(document.createTextNode(message));
8 document.getElementById("console").appendChild(item);
11 dne_error_count = 0
13 function dne_onerror()
15 log("DNE_ONERROR called");
16 ++dne_error_count;
17 if (dne_error_count == 2) {
18 log("SUCCESS. Two errors.");
19 testRunner.notifyDone();
23 if (window.testRunner) {
24 testRunner.waitUntilDone();
25 testRunner.dumpAsText();
26 testRunner.dumpResourceResponseMIMETypes();
28 </script>
29 <p>This test verifies that an image which is prefetched, and which is also contained as a
30 subresource of the current document can be loaded correctly as a subresource, even if the URI
31 doesn't exist.
33 <p>When this test succeeds, you will see nothing. When this test fails, you will crash or have another error.
34 <link rel="prefetch" href="resources/does-not-exist.jpg" onerror="dne_onerror()" />
35 <img src="resources/does-not-exist.jpg" onerror="dne_onerror()" />
36 <hr>
37 <p><ol id="console"></ol></p>
38 </body></html>