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

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

Issue 91213002: Add Future.timeout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update indentation. Created 7 years, 1 month 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 | « sdk/lib/async/future_impl.dart ('k') | tests/lib/async/future_timeout_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/future_test.dart
diff --git a/tests/lib/async/future_test.dart b/tests/lib/async/future_test.dart
index ed342bc8439124f7c565c9f59eb5786a0b0c2976..20ae1c5190c5fa7ff963e5dc0a76e7a5cb443d64 100644
--- a/tests/lib/async/future_test.dart
+++ b/tests/lib/async/future_test.dart
@@ -808,6 +808,8 @@ class CustomFuture<T> implements Future<T> {
Future catchError(Function onError, {bool test(e)}) =>
_realFuture.catchError(onError, test: test);
Future whenComplete(action()) => _realFuture.whenComplete(action);
+ Future timeout(Duration timeLimit, [void onTimeout()]) =>
+ _realFuture.timeout(timeLimit, onTimeout);
Stream asStream() => _realFuture.asStream();
String toString() => "CustomFuture@${_realFuture.hashCode}";
int get hashCode => _realFuture.hashCode;
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | tests/lib/async/future_timeout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698