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

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

Issue 10173024: Change the error handling in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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
Index: tests/standalone/src/io/HttpShutdownTest.dart
diff --git a/tests/standalone/src/io/HttpShutdownTest.dart b/tests/standalone/src/io/HttpShutdownTest.dart
index 70821bff66afc21be6835d3ae423e9bbd207ab47..f5a7fd2782162671b60a3b4d0b7562e4c3473afd 100644
--- a/tests/standalone/src/io/HttpShutdownTest.dart
+++ b/tests/standalone/src/io/HttpShutdownTest.dart
@@ -46,6 +46,7 @@ void test2(int totalConnections) {
for (int i = 0; i < totalConnections; i++) {
HttpClientConnection conn = client.get("127.0.0.1", server.port, "/");
conn.onRequest = (HttpClientRequest request) {
+ request.contentLength = -1;
request.outputStream.writeString("Hello, world!");
request.outputStream.close();
};
@@ -65,6 +66,9 @@ void test3(int totalConnections) {
HttpServer server = new HttpServer();
server.listen("127.0.0.1", 0, totalConnections);
server.defaultRequestHandler = (HttpRequest request, HttpResponse response) {
+ request.inputStream.onData = () {
+ request.inputStream.read();
+ };
request.inputStream.onClosed = () {
response.outputStream.writeString("!dlrow ,olleH");
response.outputStream.close();
@@ -76,6 +80,7 @@ void test3(int totalConnections) {
for (int i = 0; i < totalConnections; i++) {
HttpClientConnection conn = client.get("127.0.0.1", server.port, "/");
conn.onRequest = (HttpClientRequest request) {
+ request.contentLength = -1;
request.outputStream.writeString("Hello, world!");
request.outputStream.close();
};
« no previous file with comments | « tests/standalone/src/io/HttpServerSocketTest.dart ('k') | tests/standalone/src/io/ProcessBrokenPipeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698