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

Unified Diff: pkg/scheduled_test/lib/src/utils.dart

Issue 14886015: Use runAsync for Futures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « no previous file | pkg/unittest/test/unittest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/utils.dart
diff --git a/pkg/scheduled_test/lib/src/utils.dart b/pkg/scheduled_test/lib/src/utils.dart
index 4bd4505f8aefc57f8b88ba0bab43a05b77d813f1..a86f480c12d2cc11e1b6738683b408f30964ef12 100644
--- a/pkg/scheduled_test/lib/src/utils.dart
+++ b/pkg/scheduled_test/lib/src/utils.dart
@@ -52,7 +52,7 @@ String prefixLines(String text, {String prefix: '| ', String firstPrefix}) {
/// any code to run, as long as it's not waiting on some external event.
Future pumpEventQueue([int times=20]) {
if (times == 0) return new Future.value();
- return new Future.value().then((_) => pumpEventQueue(times - 1));
+ return new Future.delayed(Duration.ZERO, () => pumpEventQueue(times - 1));
nweiz 2013/05/10 23:49:43 It would be nice to add a comment here about which
floitsch 2013/05/13 10:52:48 Done.
}
/// Returns whether [iterable1] has the same elements in the same order as
« no previous file with comments | « no previous file | pkg/unittest/test/unittest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698