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

Unified Diff: utils/tests/pub/pub_lish_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 | « 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_lish_test.dart
diff --git a/utils/tests/pub/pub_lish_test.dart b/utils/tests/pub/pub_lish_test.dart
index 62fcdf8569b9071e0500b4ede89f95efa1c32bf1..495055463286a5c75b7b809b888516c0bbfe17ec 100644
--- a/utils/tests/pub/pub_lish_test.dart
+++ b/utils/tests/pub/pub_lish_test.dart
@@ -29,7 +29,7 @@ void handleUploadForm(ScheduledServer server, [Map body]) {
}
response.headers.contentType = new ContentType("application", "json");
- response.addString(json.stringify(body));
+ response.write(json.stringify(body));
response.close();
});
});
@@ -63,7 +63,7 @@ main() {
handleUpload(server);
server.handle('GET', '/create', (request, response) {
- response.addString(json.stringify({
+ response.write(json.stringify({
'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
}));
response.close();
@@ -150,7 +150,7 @@ main() {
handleUpload(server);
server.handle('GET', '/create', (request, response) {
- response.addString(json.stringify({
+ response.write(json.stringify({
'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
}));
response.close();
@@ -170,7 +170,7 @@ main() {
server.handle('GET', '/packages/versions/new.json', (request, response) {
response.statusCode = 400;
- response.addString(json.stringify({
+ response.write(json.stringify({
'error': {'message': 'your request sucked'}
}));
response.close();
@@ -188,7 +188,7 @@ main() {
confirmPublish(pub);
server.handle('GET', '/packages/versions/new.json', (request, response) {
- response.addString('{not json');
+ response.write('{not json');
response.close();
});
@@ -295,7 +295,7 @@ main() {
return drainStream(request).then((_) {
response.statusCode = 400;
response.headers.contentType = new ContentType('application', 'xml');
- response.addString('<Error><Message>Your request sucked.'
+ response.write('<Error><Message>Your request sucked.'
'</Message></Error>');
response.close();
});
@@ -337,7 +337,7 @@ main() {
server.handle('GET', '/create', (request, response) {
response.statusCode = 400;
- response.addString(json.stringify({
+ response.write(json.stringify({
'error': {'message': 'Your package was too boring.'}
}));
response.close();
@@ -357,7 +357,7 @@ main() {
handleUpload(server);
server.handle('GET', '/create', (request, response) {
- response.addString('{not json');
+ response.write('{not json');
response.close();
});
@@ -378,7 +378,7 @@ main() {
var body = {'error': 'Your package was too boring.'};
server.handle('GET', '/create', (request, response) {
response.statusCode = 400;
- response.addString(json.stringify(body));
+ response.write(json.stringify(body));
response.close();
});
@@ -398,7 +398,7 @@ main() {
var body = {'success': 'Your package was awesome.'};
server.handle('GET', '/create', (request, response) {
- response.addString(json.stringify(body));
+ response.write(json.stringify(body));
response.close();
});
@@ -425,7 +425,7 @@ main() {
handleUpload(server);
server.handle('GET', '/create', (request, response) {
- response.addString(json.stringify({
+ response.write(json.stringify({
'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
}));
response.close();
@@ -449,7 +449,7 @@ main() {
handleUpload(server);
server.handle('GET', '/create', (request, response) {
- response.addString(json.stringify({
+ response.write(json.stringify({
'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
}));
response.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