3 <title><SCRIPT
> load and error events
</title>
4 <script type=
"text/javascript">
5 var status_
= new Array();
20 if (status_
[0] != "E")
22 if (status_
[1] != "E")
25 if (status_
[2] != "L")
27 if (status_
[4] != "L")
29 if (status_
[5] != "L")
32 var results
= document
.getElementById("results");
34 results
.innerHTML
= "FAIL: The following tests failed: " + failures
;
36 results
.innerHTML
= "PASS";
38 if (window
.testRunner
)
39 testRunner
.notifyDone();
44 if (window
.testRunner
) {
45 testRunner
.dumpAsText();
46 testRunner
.waitUntilDone();
49 var e
= document
.createElement("script");
50 e
.type
= "text/javascript";
51 e
.src
= 'resources/script-load.js';
52 e
.onload = function() {
56 document
.getElementsByTagName("head")[0].appendChild( e
);
60 <body onload=
"test()">
61 <script type=
"text/javascript" onload=
"loaded(0)" onerror=
"erred(0)" src=
"resources/certainlydoesnotexist.js"></script>
62 <script type=
"text/javascript" onload=
"loaded(1)" onerror=
"erred(1)" src=
"resources/certainlydoesnotexist.js"></script>
63 <script type=
"text/javascript" onload=
"loaded(2)" onerror=
"erred(2)" src=
"resources/script-load.js"></script>
64 <!-- 3 was a self-closing script tag, however that is covered by fast/parser/script-tag-with-trailing-slash.html -->
65 <script type=
"text/javascript">
66 document
.write('<script type="text/javascript" onload="loaded(4)" onerror="erred(4)" src="resources/script-load.js"></script'+'>');
68 This tests for regressions against
<i><a href=
"https://bugs.webkit.org/show_bug.cgi?id=5812">https://bugs.webkit.org/show_bug.cgi?id=
5812</a>
69 Generate load events for
<script
> elements
</i>.
71 <p id=
"results">FAIL: Test never finished.
</p>