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

Unified Diff: tests/standalone/src/io/HttpTest.dart

Issue 9653026: Add writeString method to OutputStream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 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 | « tests/standalone/src/io/HttpShutdownTest.dart ('k') | tests/standalone/src/io/ListOutputStreamTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/HttpTest.dart
diff --git a/tests/standalone/src/io/HttpTest.dart b/tests/standalone/src/io/HttpTest.dart
index f7d2b6ed46d70e8adf34fd89ec36d61b09c7bde1..62e18e27a5598fa3fa356c745283bcc9e4381c38 100644
--- a/tests/standalone/src/io/HttpTest.dart
+++ b/tests/standalone/src/io/HttpTest.dart
@@ -104,7 +104,7 @@ class TestServer extends Isolate {
Expect.equals("GET", request.method);
request.inputStream.onData = () {};
request.inputStream.onClosed = () {
- response.writeString("01234567890");
+ response.outputStream.writeString("01234567890");
response.outputStream.close();
};
}
@@ -113,7 +113,7 @@ class TestServer extends Isolate {
void _notFoundHandler(HttpRequest request, HttpResponse response) {
response.statusCode = HttpStatus.NOT_FOUND;
response.setHeader("Content-Type", "text/html; charset=UTF-8");
- response.writeString("Page not found");
+ response.outputStream.writeString("Page not found");
response.outputStream.close();
}
@@ -260,8 +260,8 @@ void testPOST(bool chunkedEncoding) {
httpClient.post("127.0.0.1", port, "/echo");
conn.onRequest = (HttpClientRequest request) {
if (chunkedEncoding) {
- request.writeString(data.substring(0, 10));
- request.writeString(data.substring(10, data.length));
+ request.outputStream.writeString(data.substring(0, 10));
+ request.outputStream.writeString(data.substring(10, data.length));
} else {
request.contentLength = data.length;
request.outputStream.write(data.charCodes());
@@ -311,8 +311,8 @@ void testReadInto(bool chunkedEncoding) {
httpClient.post("127.0.0.1", port, "/echo");
conn.onRequest = (HttpClientRequest request) {
if (chunkedEncoding) {
- request.writeString(data.substring(0, 10));
- request.writeString(data.substring(10, data.length));
+ request.outputStream.writeString(data.substring(0, 10));
+ request.outputStream.writeString(data.substring(10, data.length));
} else {
request.contentLength = data.length;
request.outputStream.write(data.charCodes());
@@ -366,8 +366,8 @@ void testReadShort(bool chunkedEncoding) {
httpClient.post("127.0.0.1", port, "/echo");
conn.onRequest = (HttpClientRequest request) {
if (chunkedEncoding) {
- request.writeString(data.substring(0, 10));
- request.writeString(data.substring(10, data.length));
+ request.outputStream.writeString(data.substring(0, 10));
+ request.outputStream.writeString(data.substring(10, data.length));
} else {
request.contentLength = data.length;
request.outputStream.write(data.charCodes());
« no previous file with comments | « tests/standalone/src/io/HttpShutdownTest.dart ('k') | tests/standalone/src/io/ListOutputStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698