OLD | NEW |
(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 |
OLD | NEW |