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

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

Issue 9956062: Refactor the close and error handling of HTTP connections (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed additional review comments 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/HttpServerEarlyServerCloseTest.dart
diff --git a/tests/standalone/src/io/HttpServerEarlyServerCloseTest.dart b/tests/standalone/src/io/HttpServerEarlyServerCloseTest.dart
index 5f6cf5facd26f358c1e17cca61e70e1fdde9e24b..c9be9bc2c832f2f7ec4260a4b92a569182ef30a7 100644
--- a/tests/standalone/src/io/HttpServerEarlyServerCloseTest.dart
+++ b/tests/standalone/src/io/HttpServerEarlyServerCloseTest.dart
@@ -7,10 +7,10 @@ class Server {
server.listen("127.0.0.1", 0);
port = server.port;
server.onRequest = (HttpRequest request, HttpResponse response) {
- new Timer(100, (timer) => server.close());
+ new Timer(0, (timer) => server.close());
};
- server.onError = (Object exception) {
- Expect.fail("Close should not give an error.");
+ server.onError = (e) {
+ Expect.fail("No server errors expected: $e");
};
}
int port;
@@ -27,7 +27,7 @@ class Client {
c.onResponse = (HttpClientResponse response) {
Expect.fail("Response should not be given, as not data was returned.");
};
- c.onError = (Object exception) {
+ c.onError = (e) {
r.close();
};
}

Powered by Google App Engine
This is Rietveld 408576698