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

Unified Diff: pkg/oauth2/test/utils.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 | « pkg/oauth2/test/credentials_test.dart ('k') | pkg/scheduled_test/lib/scheduled_process.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/test/utils.dart
diff --git a/pkg/oauth2/test/utils.dart b/pkg/oauth2/test/utils.dart
index b874cc4e7099347f8f1bad59c4dde0dcce4e65bc..9198c8025fda0aba977d7870e554e50828e62584 100644
--- a/pkg/oauth2/test/utils.dart
+++ b/pkg/oauth2/test/utils.dart
@@ -38,7 +38,7 @@ class ExpectClient extends MockClient {
Future<http.Response> _handleRequest(http.Request request) {
if (_handlers.isEmpty) {
- return new Future.immediate(new http.Response('not found', 404));
+ return new Future.value(new http.Response('not found', 404));
} else {
return _handlers.removeFirst()(request);
}
« no previous file with comments | « pkg/oauth2/test/credentials_test.dart ('k') | pkg/scheduled_test/lib/scheduled_process.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698