chromium/third_party/blink/web_tests/images/onload-event-when-reloading-image-after-successful-image-load.html

<!DOCTYPE html>
<title>crbug.com/469678: We should fire an image load event even if the image is the last one we loaded successfully.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
    var img = new Image();
    var testImage = 'resources/green.jpg';
    var resetImage = 'resources/green.jpg';
    // In this test we load an image then we immediately launch another request
    // for the same image - only one load event should be fired. Then we do the
    // same again: another load event should be fired.
    img.onload = t.step_func(function() {
        img.src = resetImage;
        img.src = testImage;
        img.onload = t.step_func_done();
    });
    img.src = resetImage;
    img.src = testImage;
});
</script>