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!)');
17 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=13584">bug
13584</a>:
18 <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>
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
);