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

Unified Diff: tests/standalone/io/http_connection_header_test.dart

Issue 11411121: Generate an error for active connections when the HTTP client is shutdown (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed long line Created 8 years, 1 month 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/io/http_connection_header_test.dart
diff --git a/tests/standalone/io/http_connection_header_test.dart b/tests/standalone/io/http_connection_header_test.dart
index 617854a3e224082c3bbfc0e57bf8a18012bd0594..ead20673abe9b9b1252d20be91ac56ed6de2736d 100644
--- a/tests/standalone/io/http_connection_header_test.dart
+++ b/tests/standalone/io/http_connection_header_test.dart
@@ -64,11 +64,13 @@ void test(int totalConnections, bool clientPersistentConnection) {
Expect.isFalse(response.persistentConnection);
checkExpectedConnectionHeaders(response.headers,
response.persistentConnection);
- count++;
- if (count == totalConnections) {
- client.shutdown();
- server.close();
- }
+ response.inputStream.onClosed = () {
+ count++;
+ if (count == totalConnections) {
+ client.shutdown();
+ server.close();
+ }
+ };
};
}
}

Powered by Google App Engine
This is Rietveld 408576698