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

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

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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 | « runtime/lib/deferred_load_patch.dart ('k') | sdk/lib/_internal/compiler/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 afd7030cde492743f1a0d802f5ed6b74816eca29..38d1089f01b0815687002c8bfffd9bf3e6fdbdb2 100644
--- a/samples/tests/samples/lib/layout/layout_test.dart
+++ b/samples/tests/samples/lib/layout/layout_test.dart
@@ -172,14 +172,14 @@ Future usingGrid(String example, Future test_(View grid)) {
Future verifyGrid(String example, [Map expected = null]) {
printMetrics(example);
if (expected == null) {
- return new Future.immediate(null);
+ return new Future.value();
}
for (String name in expected.keys) {
final values = expected[name];
final node = document.body.query('#$name');
Expect.isNotNull(node);
- return new Future.immediate(null).then((_) {
+ return new Future.value().then((_) {
Expect.equals(values[0], node.offsetLeft);
Expect.equals(values[1], node.offsetTop);
Expect.equals(values[2], node.offsetWidth);
« no previous file with comments | « runtime/lib/deferred_load_patch.dart ('k') | sdk/lib/_internal/compiler/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698