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

Unified Diff: tests/standalone/io/http_session_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_session_test.dart
diff --git a/tests/standalone/io/http_session_test.dart b/tests/standalone/io/http_session_test.dart
index 2b7f81c6080d2b60203f9cfcfc6fe6bc2faa99ce..1538c2c56e12a7d84fbff8fca1e6b6df8d2ff3ad 100644
--- a/tests/standalone/io/http_session_test.dart
+++ b/tests/standalone/io/http_session_test.dart
@@ -30,8 +30,11 @@ Future<String> connectGetSession(int port, [String session]) {
request.outputStream.close();
};
conn.onResponse = (response) {
- client.shutdown();
- c.complete(getSessionId(response.cookies));
+ response.inputStream.onData = response.inputStream.read;
+ response.inputStream.onClosed = () {
+ client.shutdown();
+ c.complete(getSessionId(response.cookies));
+ };
};
return c.future;
}

Powered by Google App Engine
This is Rietveld 408576698