Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <title>Test <svg:image>'s sizing with css size as auto, with dynamic image chang e</title> | |
| 3 <script src="../../resources/testharness.js"></script> | |
| 4 <script src="../../resources/testharnessreport.js"></script> | |
| 5 <svg height="0"> | |
| 6 <image width="200" height="200" xlink:href="resources/square-green-checker.png " style="width:auto; height:auto"/> | |
| 7 </svg> | |
| 8 <script> | |
| 9 async_test(function(t) { | |
| 10 var image = document.querySelector('image'); | |
| 11 window.onload = t.step_func(function() { | |
| 12 var rectBBox = image.getBBox(); | |
| 13 assert_equals(rectBBox.width, 400); | |
| 14 assert_equals(rectBBox.height, 400); | |
| 15 image.setAttributeNS("http://www.w3.org/1999/xlink","href","data:image/svg+x ml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'></svg>"); | |
| 16 image.onload = t.step_func_done(function() { | |
| 17 var rectBBox = image.getBBox(); | |
| 18 assert_equals(rectBBox.width, 100); | |
| 19 assert_equals(rectBBox.height, 100); | |
| 20 }); | |
| 21 }); | |
| 22 }, document.title); | |
|
fs
2016/09/14 11:31:52
document.title not needed here (it's the default.)
Shanmuga Pandi
2016/09/14 13:15:36
Done.
| |
| 23 </script> | |
| OLD | NEW |