blob: 6e533cfab4126822207ef95657f09d7c7126e15b [file] [log] [blame]
<!DOCTYPE html>
<title>crbug.com/468915: Resetting or removing the src attribute should reset the image immediately, rather than waiting for an asynchronous load to do it.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
var img = new Image();
img.onload = t.step_func_done(function() {
assert_equals(img.naturalWidth, 16);
img.removeAttribute('src');
assert_equals(img.naturalWidth, 0);
});
img.src = 'resources/green.jpg';
});
</script>