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

Unified Diff: samples/tests/samples/chat/chat_server_test.dart

Issue 12504006: Make IOSink implement StringSink (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed second round of review comments 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 | « samples/chat/chat_server_lib.dart ('k') | sdk/lib/_internal/compiler/implementation/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/tests/samples/chat/chat_server_test.dart
diff --git a/samples/tests/samples/chat/chat_server_test.dart b/samples/tests/samples/chat/chat_server_test.dart
index 2b7361f0b7d6315a07e9f582adaee5094f442876..751dc162dc1fdaefdc8432c8ceea13d1c653b93f 100644
--- a/samples/tests/samples/chat/chat_server_test.dart
+++ b/samples/tests/samples/chat/chat_server_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
@@ -66,13 +66,13 @@ class ChatTestClient {
leaveRequest["sessionId"] = sessionId;
httpClient.post("127.0.0.1", port, "/leave")
.then((HttpClientRequest request) {
- request.addString(json.stringify(leaveRequest));
+ request.write(json.stringify(leaveRequest));
return request.close();
})
.then((HttpClientResponse response) {
StringBuffer body = new StringBuffer();
response.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () => leaveResponseHandler(response, body.toString()));
});
}
@@ -122,13 +122,13 @@ class ChatTestClient {
receiveRequest["nextMessage"] = receiveMessageNumber;
httpClient.post("127.0.0.1", port, "/receive")
.then((HttpClientRequest request) {
- request.addString(json.stringify(receiveRequest));
+ request.write(json.stringify(receiveRequest));
return request.close();
})
.then((HttpClientResponse response) {
StringBuffer body = new StringBuffer();
response.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () => receiveResponseHandler(response, body.toString()));
});
}
@@ -152,13 +152,13 @@ class ChatTestClient {
messageRequest["message"] = "message $sendMessageNumber";
httpClient.post("127.0.0.1", port, "/message")
.then((HttpClientRequest request) {
- request.addString(json.stringify(messageRequest));
+ request.write(json.stringify(messageRequest));
return request.close();
})
.then((HttpClientResponse response) {
StringBuffer body = new StringBuffer();
response.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () => sendResponseHandler(response, body.toString()));
});
}
@@ -183,13 +183,13 @@ class ChatTestClient {
joinRequest["handle"] = "test1";
httpClient.post("127.0.0.1", port, "/join")
.then((HttpClientRequest request) {
- request.addString(json.stringify(joinRequest));
+ request.write(json.stringify(joinRequest));
return request.close();
})
.then((HttpClientResponse response) {
StringBuffer body = new StringBuffer();
response.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () => joinResponseHandler(response, body.toString()));
});
}
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | sdk/lib/_internal/compiler/implementation/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698