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

Unified Diff: client/tests/client/samples/total/total_test_lib.dart

Issue 9148015: Example showing alternate async measurement solution (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final version Created 8 years, 11 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: client/tests/client/samples/total/total_test_lib.dart
diff --git a/client/tests/client/samples/total/total_test_lib.dart b/client/tests/client/samples/total/total_test_lib.dart
index 826f36a0575a378dc063a43a2049f778a54119cb..835410f8955e044c996304db657972a7b458bda5 100644
--- a/client/tests/client/samples/total/total_test_lib.dart
+++ b/client/tests/client/samples/total/total_test_lib.dart
@@ -57,8 +57,8 @@ totalTests() {
body.nodes.add(div);
HtmlUtils.setIntegerProperty(div, "left", 100, "px");
- div.computedStyle.then((CSSStyleDeclaration computedStyle) {
- String valueAsString = computedStyle.getPropertyValue("left");
+ window.requestMeasurementFrame(() {
+ String valueAsString = div.computedStyle.left;
// FIXME: Test fails, with valueAsString == "auto". However,
// setIntegerProperty works when tested in practice, so there is
// something wrong with recovering the value.

Powered by Google App Engine
This is Rietveld 408576698