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

Unified Diff: client/tests/client/html/ElementTests.dart

Issue 8932011: Make ElementTests independent of the existing HTML markup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Another code review change. Created 9 years 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: client/tests/client/html/ElementTests.dart
diff --git a/client/tests/client/html/ElementTests.dart b/client/tests/client/html/ElementTests.dart
index 6d0bf35afeb4ca2a245a4e564b53c311c3c88ed4..6e67c3d65c26dc160aff695a54eb907c938df380 100644
--- a/client/tests/client/html/ElementTests.dart
+++ b/client/tests/client/html/ElementTests.dart
@@ -51,7 +51,14 @@ void testElement() {
});
asyncTest('rect', 1, () {
- final element = document.body;
+ final container = new Element.tag("div");
+ container.style.position = 'absolute';
+ final element = new Element.tag("div");
+ element.style.width = '200px';
+ element.style.height = '200px';
+ container.elements.add(element);
+ document.body.elements.add(container);
+
element.rect.then((rect) {
expectLargeRect(rect.client);
expectLargeRect(rect.offset);
@@ -59,6 +66,7 @@ void testElement() {
Expect.equals(rect.bounding.left, 8);
Expect.equals(rect.bounding.top, 8);
Expect.isTrue(rect.clientRects.length > 0);
+ container.remove();
callbackDone();
});
});
« 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