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

Unified Diff: pkg/oauth2/test/credentials_test.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: pkg/oauth2/test/credentials_test.dart
diff --git a/pkg/oauth2/test/credentials_test.dart b/pkg/oauth2/test/credentials_test.dart
index 8e40a4a1709c9d254653a6888b87e58953c08d66..251b2c52ddfce5c47c6cde55bbf9488df6a3d6d3 100644
--- a/pkg/oauth2/test/credentials_test.dart
+++ b/pkg/oauth2/test/credentials_test.dart
@@ -76,7 +76,7 @@ void main() {
"client_secret": "secret"
}));
- return new Future.immediate(new http.Response(JSON.stringify({
+ return new Future.value(new http.Response(JSON.stringify({
'access_token': 'new access token',
'token_type': 'bearer',
'refresh_token': 'new refresh token'
@@ -106,7 +106,7 @@ void main() {
"client_secret": "secret"
}));
- return new Future.immediate(new http.Response(JSON.stringify({
+ return new Future.value(new http.Response(JSON.stringify({
'access_token': 'new access token',
'token_type': 'bearer'
}), 200, headers: {'content-type': 'application/json'}));

Powered by Google App Engine
This is Rietveld 408576698