4 crbug.com/
269946: This test passes if there are two green squares with the same sizes.
<br/>
5 <img id=
"image" width=
"100px" height=
"100px">
6 <img id=
"reference" width=
"100px" height=
"100px">
10 testRunner
.waitUntilDone();
12 // base64 encoded SVG image of a 200x200 green square.
13 var greenSquare
= 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiPg0KICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJncmVlbiIvPg0KPC9zdmc+DQo=';
15 document
.getElementById('reference').src
= greenSquare
;
16 var image
= document
.getElementById('image');
17 image
.src
= greenSquare
;
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();