2 <script src=
"../../resources/js-test.js"></script>
4 if (window
.testRunner
) {
5 testRunner
.waitUntilDone();
6 testRunner
.dumpAsText();
10 var testImage
= 'resources/green.jpg';
12 img
.onload = function(){
14 debug("Image onload event fired for " + img
.src
.substring(img
.src
.lastIndexOf('/') + 1));
15 if (onloadCounter
== 2) {
16 document
.getElementById('result').textContent
= "PASS";
17 if (window
.testRunner
)
18 testRunner
.notifyDone();
21 if (onloadCounter
== 1) {
22 setTimeout(function() {
28 document
.getElementById('result').textContent
= "FAIL";
30 setTimeout(function() {
36 crbug.com/
469678: We should fire an image load event even if the image is the last one we loaded successfully.
<br>
37 In this test we load an image. Then we make a null request (img.src='') which should clear down the image before we attempt to load the same image again.
<br>
39 <div id=
"result">FAIL
</div>