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

Unified Diff: tests/lib/async/slow_consumer_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/future_test.dart ('k') | tests/lib/async/stream_from_iterable_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/slow_consumer_test.dart
diff --git a/tests/lib/async/slow_consumer_test.dart b/tests/lib/async/slow_consumer_test.dart
index dcc616714ad9d1dc449f2a42e54780daa5901cf9..4b149244ab4a02fe44ce3172e0d656c188f969c5 100644
--- a/tests/lib/async/slow_consumer_test.dart
+++ b/tests/lib/async/slow_consumer_test.dart
@@ -28,8 +28,9 @@ class SlowConsumer extends StreamConsumer {
.then((count) {
// Simulated amount of time it takes to handle the data.
int ms = data.length * 1000 ~/ bytesPerSecond;
+ Duration duration = new Duration(milliseconds: ms);
subscription.pause();
- return new Future.delayed(ms, () {
+ return new Future.delayed(duration, () {
subscription.resume();
// Make sure we use data here to keep tracking it.
return count + data.length;
« no previous file with comments | « tests/lib/async/future_test.dart ('k') | tests/lib/async/stream_from_iterable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698