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

Unified Diff: tests/html/svgelement_test.dart

Issue 16336029: Adding tests for SVG's getBoundingClientRect. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/svgelement_test.dart
diff --git a/tests/html/svgelement_test.dart b/tests/html/svgelement_test.dart
index 256e766f01fadae101f782430522a130ef30c9f2..dc20bd245423981889ef675b4afb5a80089fece2 100644
--- a/tests/html/svgelement_test.dart
+++ b/tests/html/svgelement_test.dart
@@ -422,4 +422,21 @@ main() {
expect(el.classes.length, 0);
});
});
+
+ group('getBoundingClientRect', () {
+ test('is a Rect', () {
+ var element = new svg.RectElement();
+ element.attributes['width'] = '100';
+ element.attributes['height'] = '100';
+ var root = new svg.SvgSvgElement();
+ root.append(element);
+
+ document.body.append(root);
+
+ var rect = element.getBoundingClientRect();
+ expect(rect is Rect, isTrue);
+ expect(rect.width, 100);
+ expect(rect.height, 100);
+ });
+ });
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698