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

Unified Diff: tests/lib/async/stream_from_iterable_test.dart

Issue 12224081: Change Future.delayed to take a Duration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments and made argument optional. Created 7 years, 10 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 | « tests/lib/async/slow_consumer_test.dart ('k') | tests/standalone/io/fuzz_support.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/stream_from_iterable_test.dart
diff --git a/tests/lib/async/stream_from_iterable_test.dart b/tests/lib/async/stream_from_iterable_test.dart
index 182bf1c7dc300dabae29f021b8203466775b6d5f..0af493d0576a4bca867d14790b2da6bfa9d0bf0d 100644
--- a/tests/lib/async/stream_from_iterable_test.dart
+++ b/tests/lib/async/stream_from_iterable_test.dart
@@ -62,7 +62,10 @@ main() {
subscription = stream.listen((int value) {
actual.add(value);
// Do a 10 ms pause during the playback of the iterable.
- if (value == 20) { subscription.pause(new Future.delayed(10, () {})); }
+ Duration duration = const Duration(milliseconds: 10);
+ if (value == 20) {
+ subscription.pause(new Future.delayed(duration, () {}));
+ }
}, onDone: expectAsync0(() {
actual.close();
Events expected = new Events.fromIterable(iter);
« no previous file with comments | « tests/lib/async/slow_consumer_test.dart ('k') | tests/standalone/io/fuzz_support.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698