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

Unified Diff: utils/tests/pub/oauth2_test.dart

Issue 12613010: Update pub to use the latest dart:io stream APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « no previous file | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/oauth2_test.dart
diff --git a/utils/tests/pub/oauth2_test.dart b/utils/tests/pub/oauth2_test.dart
index c4d087312bc09d96574a88bab919bb56af59e527..82c4e2ab0a49d10958c564b4e3e6bd4c25b34df8 100644
--- a/utils/tests/pub/oauth2_test.dart
+++ b/utils/tests/pub/oauth2_test.dart
@@ -72,7 +72,7 @@ main() {
new RegExp(r'(^|&)refresh_token=refresh\+token(&|$)')));
response.headers.contentType = new ContentType("application", "json");
- response.addString(json.stringify({
+ response.write(json.stringify({
"access_token": "new access token",
"token_type": "bearer"
}));
@@ -159,7 +159,7 @@ main() {
response.statusCode = 401;
response.headers.set('www-authenticate', 'Bearer error="invalid_token",'
' error_description="your token sucks"');
- response.addString(json.stringify({
+ response.write(json.stringify({
'error': {'message': 'your token sucks'}
}));
response.close();
@@ -210,7 +210,7 @@ void handleAccessTokenRequest(ScheduledServer server, String accessToken) {
expect(body, matches(new RegExp(r'(^|&)code=access\+code(&|$)')));
response.headers.contentType = new ContentType("application", "json");
- response.addString(json.stringify({
+ response.write(json.stringify({
"access_token": accessToken,
"token_type": "bearer"
}));
« no previous file with comments | « no previous file | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698