| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.js"></script> |
| 5 <script> | 5 <script> |
| 6 jsTestIsAsync = true; | 6 jsTestIsAsync = true; |
| 7 description("Test for WK112651: SVG image container size should not survive relo
ads."); | 7 description("Test for WK112651: SVG image container size should not survive relo
ads."); |
| 8 | 8 |
| 9 function runTest() { | 9 function runTest() { |
| 10 var image1 = document.getElementById('image1'); | 10 var image1 = document.getElementById('image1'); |
| 11 image1.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' wid
th='100' height='100'><rect width='100%' height='100%' fill='green'/></svg>"; | 11 image1.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' wid
th='100' height='100'><rect width='100%' height='100%' fill='green'/></svg>"; |
| 12 image1.onload = function() { | 12 image1.onload = function() { |
| 13 image1.setAttribute('width', image1.width + 50); | 13 image1.setAttribute('width', image1.width + 50); |
| 14 var image2 = document.getElementById('image2'); | 14 var image2 = document.getElementById('image2'); |
| 15 image2.src = image1.src; | 15 image2.src = image1.src; |
| 16 image2.onload = function() { | 16 image2.onload = function() { |
| 17 shouldBe("image2.width", "100"); | 17 shouldBe("image2.width", "100"); |
| 18 finishJSTest(); | 18 finishJSTest(); |
| 19 } | 19 } |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 </script> | 22 </script> |
| 23 </head> | 23 </head> |
| 24 <body onload="runTest()"> | 24 <body onload="runTest()"> |
| 25 <img id="image1"><img id="image2"> | 25 <img id="image1"><img id="image2"> |
| 26 <script src="../../fast/js/resources/js-test-post.js"></script> | 26 <script src="../../fast/js/resources/js-test-post.js"></script> |
| 27 </body> | 27 </body> |
| 28 </html> | 28 </html> |
| OLD | NEW |