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

Unified Diff: samples/tests/samples/lib/layout/layout_test.dart

Issue 11367040: Removing Element.rect. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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: samples/tests/samples/lib/layout/layout_test.dart
diff --git a/samples/tests/samples/lib/layout/layout_test.dart b/samples/tests/samples/lib/layout/layout_test.dart
index a65b462b70470a5ce48aef731d4a5be2c6b480c4..2a2b428b9c5f91e8c9750dbb5965a2d3ab4c52a6 100644
--- a/samples/tests/samples/lib/layout/layout_test.dart
+++ b/samples/tests/samples/lib/layout/layout_test.dart
@@ -159,7 +159,7 @@ usingGrid(String example, void test_(View grid)) {
window.setTimeout(() {
test_(grid);
window.setTimeout(expectAsync0(() { grid.removeFromDocument(); }), 0);
- }, 0);
+ }, 0);
}
verifyGrid(String example, [Map expected = null]) {
@@ -172,12 +172,11 @@ verifyGrid(String example, [Map expected = null]) {
final values = expected[name];
final node = document.body.query('#$name');
Expect.isNotNull(node);
- node.rect.then(expectAsync0((rect) {
- final offset = rect.offset;
- Expect.equals(values[0], offset.left);
- Expect.equals(values[1], offset.top);
- Expect.equals(values[2], offset.width);
- Expect.equals(values[3], offset.height);
+ window.requestLayoutFrame(expectAsync0(() {
+ Expect.equals(values[0], node.offsetLeft);
+ Expect.equals(values[1], node.offsetTop);
+ Expect.equals(values[2], node.offsetWidth);
+ Expect.equals(values[3], node.offsetHeight);
}));
}
}

Powered by Google App Engine
This is Rietveld 408576698