Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
| 2 <title>SVGElement::getClientRects()</title> | |
|
fs
2016/09/22 10:39:44
Element.getClientRects() on an SVGElement
Shanmuga Pandi
2016/09/29 10:45:55
Done.
| |
| 3 <script src="../../resources/testharness.js"></script> | |
| 4 <script src="../../resources/testharnessreport.js"></script> | |
| 5 <body style="margin:0; border:0; padding:0;"> | |
| 6 <svg width="100px" height="100px"> | |
| 7 <rect x="20" y="30" width="40" height="50" /> | |
| 8 </svg> | |
| 9 <script> | |
| 10 test(function() { | |
| 11 var r1 = document.querySelector("rect").getClientRects()[0]; | |
|
fs
2016/09/22 10:39:44
assert_equals(rectlist.length, 1); too maybe?
Shanmuga Pandi
2016/09/29 10:45:54
Done.
| |
| 12 assert_equals(r1.left, 20); | |
| 13 assert_equals(r1.top, 30); | |
| 14 assert_equals(r1.width, 40); | |
| 15 assert_equals(r1.height, 50); | |
| 16 assert_equals(r1.right, 60); | |
| 17 assert_equals(r1.bottom, 80); | |
| 18 }); | |
|
fs
2016/09/22 10:39:44
Also add a subtest for the <g> with multiple shape
Shanmuga Pandi
2016/09/29 10:45:55
Done.
| |
| 19 </script> | |
| 20 </body> | |
| OLD | NEW |