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 window.onload = function () { | |
| 10 async_test(function(t) { | |
|
fs
2016/08/19 08:59:45
Switch the order of these two lines, and use a ste
Shanmuga Pandi
2016/09/14 09:20:16
Done.
| |
| 11 var image = document.getElementsByTagName('image')[0]; | |
|
fs
2016/08/19 08:59:45
querySelector('image')
Shanmuga Pandi
2016/09/14 09:20:16
Done.
| |
| 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/s vg+xml,<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 }, document.title + ' and box size should be ' + '100 100'); | |
|
fs
2016/08/19 08:59:45
I think you can go with the default testname here.
Shanmuga Pandi
2016/09/14 09:20:16
Done.
| |
| 22 }; | |
| 23 </script> | |
| OLD | NEW |