| <!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> |