Chromium Code Reviews

Unified Diff: tests/standalone/io/http_shutdown_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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « tests/standalone/io/http_server_response_test.dart ('k') | tests/standalone/io/http_stream_close_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_shutdown_test.dart
diff --git a/tests/standalone/io/http_shutdown_test.dart b/tests/standalone/io/http_shutdown_test.dart
index 8c91797d584cb41d0b73cf0e61c9ce2e06adcf8f..c24fc2ed2603825192295fc7ff9bb4f4c858cdef 100644
--- a/tests/standalone/io/http_shutdown_test.dart
+++ b/tests/standalone/io/http_shutdown_test.dart
@@ -40,7 +40,7 @@ void test2(int totalConnections, int outputStreamWrites) {
// Server which responds without waiting for request body.
HttpServer.bind().then((server) {
server.listen((HttpRequest request) {
- request.response.addString("!dlrow ,olleH");
+ request.response.write("!dlrow ,olleH");
request.response.close();
});
@@ -51,7 +51,7 @@ void test2(int totalConnections, int outputStreamWrites) {
.then((HttpClientRequest request) {
request.contentLength = -1;
for (int i = 0; i < outputStreamWrites; i++) {
- request.addString("Hello, world!");
+ request.write("Hello, world!");
}
request.done.catchError((_) {});
return request.close();
@@ -86,7 +86,7 @@ void test3(int totalConnections) {
server.listen((HttpRequest request) {
request.listen((_) {}, onDone: () {
- request.response.addString("!dlrow ,olleH");
+ request.response.write("!dlrow ,olleH");
request.response.close();
});
});
@@ -97,7 +97,7 @@ void test3(int totalConnections) {
client.get("127.0.0.1", server.port, "/")
.then((HttpClientRequest request) {
request.contentLength = -1;
- request.addString("Hello, world!");
+ request.write("Hello, world!");
return request.close();
})
.then((HttpClientResponse response) {
@@ -164,7 +164,7 @@ void test5(int totalConnections) {
for (int i = 0; i < totalConnections; i++) {
client.post("127.0.0.1", server.port, "/")
.then((request) {
- request.add([0]);
+ request.writeBytes([0]);
// TODO(sgjesse): Make this test work with
//request.response instead of request.close() return
//return request.response;
« no previous file with comments | « tests/standalone/io/http_server_response_test.dart ('k') | tests/standalone/io/http_stream_close_test.dart » ('j') | no next file with comments »

Powered by Google App Engine