| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library oauth2_test; | 5 library oauth2_test; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:json' as json; | 8 import 'dart:json' as json; |
| 9 import 'dart:uri'; | 9 import 'dart:uri'; |
| 10 | 10 |
| 11 import 'test_pub.dart'; | 11 import 'test_pub.dart'; |
| 12 import 'test_pub.dart'; | |
| 13 import '../../../pkg/http/lib/http.dart' as http; | 12 import '../../../pkg/http/lib/http.dart' as http; |
| 14 import '../../../pkg/unittest/lib/unittest.dart'; | 13 import '../../../pkg/unittest/lib/unittest.dart'; |
| 15 import '../../pub/io.dart'; | 14 import '../../pub/io.dart'; |
| 16 import '../../pub/utils.dart'; | 15 import '../../pub/utils.dart'; |
| 17 | 16 |
| 18 main() { | 17 main() { |
| 19 setUp(() => normalPackage.scheduleCreate()); | 18 setUp(() => normalPackage.scheduleCreate()); |
| 20 | 19 |
| 21 integration('with no credentials.json, authenticates and saves ' | 20 integration('with no credentials.json, authenticates and saves ' |
| 22 'credentials.json', () { | 21 'credentials.json', () { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 204 |
| 206 response.headers.contentType = new ContentType("application", "json"); | 205 response.headers.contentType = new ContentType("application", "json"); |
| 207 response.outputStream.writeString(json.stringify({ | 206 response.outputStream.writeString(json.stringify({ |
| 208 "access_token": accessToken, | 207 "access_token": accessToken, |
| 209 "token_type": "bearer" | 208 "token_type": "bearer" |
| 210 })); | 209 })); |
| 211 response.outputStream.close(); | 210 response.outputStream.close(); |
| 212 }); | 211 }); |
| 213 }); | 212 }); |
| 214 } | 213 } |
| OLD | NEW |