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

Side by Side Diff: LayoutTests/svg/as-image/image-change-with-equal-sizes.html

Issue 23890043: Update image content rect on src changes even if intrinsic size matches (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/svg/as-image/image-change-with-equal-sizes-expected.html » ('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 <html>
3 <body>
4 crbug.com/269946: This test passes if there are two green squares with the sam e sizes.<br/>
5 <img id="image" width="100px" height="100px">
6 <img id="reference" width="100px" height="100px">
7
8 <script>
9 if (window.testRunner)
10 testRunner.waitUntilDone();
11
12 // base64 encoded SVG image of a 200x200 green square.
13 var greenSquare = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmN vZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9 yZy8yMDAwL3N2ZyIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiPg0KICA8cmVjdCB3aWR0aD0iMTAwJSI gaGVpZ2h0PSIxMDAlIiBmaWxsPSJncmVlbiIvPg0KPC9zdmc+DQo=';
14
15 document.getElementById('reference').src = greenSquare;
16 var image = document.getElementById('image');
17 image.src = greenSquare;
18
19 // Change the image to an external image with dimensions 200x200.
20 image.src = 'resources/200x200-blue-rect.svg';
21 image.onload = function() {
22 setTimeout(function() {
23 // Change the image back to a 200x200 green square and verify that
24 // the original dimensions are restored.
25 image.src = greenSquare;
26 if (window.testRunner)
27 testRunner.notifyDone();
28 }, 0);
29 }
30 </script>
31 </body>
32 </html>
33
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/svg/as-image/image-change-with-equal-sizes-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698