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

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

Issue 11785028: Commit Martin's patch for pub + lib_v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. 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
« no previous file with comments | « utils/tests/pub/oauth2_test.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/pub_uploader_test.dart
diff --git a/utils/tests/pub/pub_uploader_test.dart b/utils/tests/pub/pub_uploader_test.dart
index d4b2a1dff64cf82cd73fb4d547917f7f7a19740f..585c3e9fe087565b8028eecc2ad82284925b2c26 100644
--- a/utils/tests/pub/pub_uploader_test.dart
+++ b/utils/tests/pub/pub_uploader_test.dart
@@ -5,7 +5,7 @@
library pub_uploader_test;
import 'dart:io';
-import 'dart:json';
+import 'dart:json' as json;
import 'test_pub.dart';
import '../../../pkg/unittest/lib/unittest.dart';
@@ -24,7 +24,7 @@ final USAGE_STRING = '''
''';
ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) {
- var tokenEndpoint = server.url.transform((url) =>
+ var tokenEndpoint = server.url.then((url) =>
url.resolve('/token').toString());
args = flatten(['uploader', '--server', tokenEndpoint, args]);
return startPub(args: args, tokenEndpoint: tokenEndpoint);
@@ -49,11 +49,11 @@ main() {
var pub = startPubUploader(server, ['--package', 'pkg', 'add', 'email']);
server.handle('POST', '/packages/pkg/uploaders.json', (request, response) {
- expect(consumeInputStream(request.inputStream).transform((bodyBytes) {
+ expect(consumeInputStream(request.inputStream).then((bodyBytes) {
expect(new String.fromCharCodes(bodyBytes), equals('email=email'));
response.headers.contentType = new ContentType("application", "json");
- response.outputStream.writeString(JSON.stringify({
+ response.outputStream.writeString(json.stringify({
'success': {'message': 'Good job!'}
}));
response.outputStream.close();
« no previous file with comments | « utils/tests/pub/oauth2_test.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698