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

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

Issue 11830017: Fix ALL the pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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: utils/tests/pub/oauth2_test.dart
diff --git a/utils/tests/pub/oauth2_test.dart b/utils/tests/pub/oauth2_test.dart
index 634826e4935da2e59550877c8f4122694db0fb9e..1c94c32e52b70618e43c035eebf0359ea9fbcb38 100644
--- a/utils/tests/pub/oauth2_test.dart
+++ b/utils/tests/pub/oauth2_test.dart
@@ -5,7 +5,7 @@
library oauth2_test;
import 'dart:io';
-import 'dart:json';
+import 'dart:json' as json;
import 'dart:uri';
import 'test_pub.dart';
@@ -74,7 +74,7 @@ main() {
new RegExp(r'(^|&)refresh_token=refresh\+token(&|$)')));
response.headers.contentType = new ContentType("application", "json");
- response.outputStream.writeString(JSON.stringify({
+ response.outputStream.writeString(json.stringify({
"access_token": "new access token",
"token_type": "bearer"
}));
@@ -162,7 +162,7 @@ main() {
response.statusCode = 401;
response.headers.set('www-authenticate', 'Bearer error="invalid_token",'
' error_description="your token sucks"');
- response.outputStream.writeString(JSON.stringify({
+ response.outputStream.writeString(json.stringify({
'error': {'message': 'your token sucks'}
}));
response.outputStream.close();
@@ -214,7 +214,7 @@ void handleAccessTokenRequest(ScheduledServer server, String accessToken) {
expect(body, matches(new RegExp(r'(^|&)code=access\+code(&|$)')));
response.headers.contentType = new ContentType("application", "json");
- response.outputStream.writeString(JSON.stringify({
+ response.outputStream.writeString(json.stringify({
"access_token": accessToken,
"token_type": "bearer"
}));

Powered by Google App Engine
This is Rietveld 408576698