Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/custom/getClientRects.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/custom/getClientRects.html b/third_party/WebKit/LayoutTests/svg/custom/getClientRects.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f3d9b0abf9d1b86c3736a9b71f73d22147ed7444 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/custom/getClientRects.html |
| @@ -0,0 +1,20 @@ |
| +<!DOCTYPE HTML> |
| +<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.
|
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<body style="margin:0; border:0; padding:0;"> |
| +<svg width="100px" height="100px"> |
| + <rect x="20" y="30" width="40" height="50" /> |
| +</svg> |
| +<script> |
| +test(function() { |
| + 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.
|
| + assert_equals(r1.left, 20); |
| + assert_equals(r1.top, 30); |
| + assert_equals(r1.width, 40); |
| + assert_equals(r1.height, 50); |
| + assert_equals(r1.right, 60); |
| + assert_equals(r1.bottom, 80); |
| +}); |
|
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.
|
| +</script> |
| +</body> |