4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
9 var expectedPasses
= 6;
10 var messages
= new Array();
11 var currentMessageIndex
= 0;
15 document
.getElementById("console").appendChild(document
.createTextNode(message
));
16 document
.getElementById("console").appendChild(document
.createElement("br"));
19 function logPass(message
, messageNumber
)
21 messages
[messageNumber
] = 'PASS: ' + message
;
23 while (messages
[currentMessageIndex
]) {
24 log(messages
[currentMessageIndex
]);
25 currentMessageIndex
++;
29 if (expectedPasses
== 0 && window
.testRunner
)
30 testRunner
.notifyDone();
33 <link rel=
"icon" src=
"" href=
"" onerror=
"log('FAIL: link rel=icon onerror fired')"></link>
34 <link rel=
"prefetch" src=
"" href=
"" onerror=
"log('FAIL: link rel=prefetch onerror fired')"></link>
35 <link rel=
"stylesheet" src=
"" href=
"" onerror=
"log('FAIL: link rel=stylesheet onerror fired')"></link>
38 <div id=
"console"></div>
39 <command icon=
"" onerror=
"log('FAIL: command onerror fired')"></command>
40 <object data=
"" onerror=
"log('FAIL: object onerror fired')"></object>
41 <embed src=
"" onerror=
"log('FAIL: embed onerror fired')"></embed>
42 <video poster=
"" onerror=
"log('FAIL: video poster onerror fired')"></video>
43 <img src=
"" onerror=
"logPass('img onerror fired', 0)"></img>
44 <input type=
"image" src=
"" onerror=
"logPass('input type=image onerror fired', 1)"></input>
45 <script src=
"" onerror=
"logPass('script onerror fired', 2)"></script>
46 <video id=
"video" src=
"" onerror=
"logPass('video src onerror fired', 3)"></video>
47 <audio id=
"audio" src=
"" onerror=
"logPass('audio onerror fired', 4)"></audio>
48 <video><source src=
"" onerror=
"logPass('source onerror fired', 5)"></source></video>
50 document
.getElementById("video").load();
51 document
.getElementById("audio").load();