Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: LayoutTests/fast/images/natural-dimensions-correct-after-image-reset.html

Issue 1047803005: Allow the "img.src='';img.src='.." idiom to clear down images immediately. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/images/natural-dimensions-correct-after-image-reset-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
4 if (window.testRunner) {
5 testRunner.waitUntilDone();
6 testRunner.dumpAsText();
7 }
8 img = new Image();
9 var testImage = 'resources/green.jpg';
10 img.onload = function(){
11 img.removeAttribute('src');
12 if (img.naturalWidth > 0) {
13 debug("Natural width is : " + img.naturalWidth + " and should be 0." );
14 if (window.testRunner)
15 testRunner.notifyDone();
16 return;
17 }
18 document.getElementById('result').textContent = "PASS";
19 if (window.testRunner)
20 testRunner.notifyDone();
21 };
22 setTimeout(function() {
23 img.src = testImage;
24 }, 0);
25 </script>
26 <div id="console">
27 crbug.com/468915: Resetting or removing the src attribute should reset the i mage immediately, rather than waiting for an asynchronous load to do it.<br>
28 </div>
29 <div id="result">FAIL</div>
30
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/images/natural-dimensions-correct-after-image-reset-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698