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); |
})); |
} |
} |