Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / misc / unloadable-script.html
blob1d0548d6fe1d49165daf3a3979d9eaff25cd6e1c
1 <html>
2 <head>
3 <script>
4 function log(message) {
5 var p = document.createElement("p");
6 p.appendChild(document.createTextNode(message));
7 document.getElementById("console").appendChild(p);
10 function handleScriptOnError()
12 log('onerror called (good!)');
14 </script>
15 </head>
16 <body>
17 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=13584">bug 13584</a>:
18 &lt;script> code wrongly assumes requests can't fail.</p>
19 <p>No crash == SUCCESS.</p>
21 <div id=console></div>
23 <script onerror="handleScriptOnError()" id=test_script></script>
25 <script>
26 if (window.testRunner)
27 testRunner.dumpAsText();
29 <!-- we are an HTTP test so the security origin will fail the file method -->
30 document.getElementById('test_script').src = "file:///foobar";
32 script = document.createElement("script");
33 script.setAttribute("src", "file:///foobar");
34 script.setAttribute("onerror", "handleScriptOnError()");
35 document.body.appendChild(script);
36 </script>
37 </body>
38 </html>