Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/getClientRects.html

Issue 2349653002: Added support of getClientRects() for SVG Elements. (Closed)
Patch Set: nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.h » ('j') | third_party/WebKit/Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698