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

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

Issue 10119005: Add HTTP handler registration to the HTTP server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert test edit 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/HttpServerTest.dart
diff --git a/tests/standalone/src/io/HttpServerTest.dart b/tests/standalone/src/io/HttpServerTest.dart
index 94486888a2da1f06feeb8141a822bdc1f841936d..c5fcd7f5bde8a31020b5a0baed79487e9b710cf7 100644
--- a/tests/standalone/src/io/HttpServerTest.dart
+++ b/tests/standalone/src/io/HttpServerTest.dart
@@ -17,11 +17,12 @@ void testListenOn() {
Expect.throws(() => server.port);
ReceivePort serverPort = new ReceivePort();
- server.onRequest = (HttpRequest request, HttpResponse response) {
- request.inputStream.onClosed = () {
- response.outputStream.close();
- serverPort.close();
- };
+ server.defaultRequestHandler =
+ (HttpRequest request, HttpResponse response) {
+ request.inputStream.onClosed = () {
+ response.outputStream.close();
+ serverPort.close();
+ };
};
Mads Ager (google) 2012/04/18 12:22:08 ditto
Søren Gjesse 2012/04/18 13:26:56 Done.
server.onError = (Exception e) {

Powered by Google App Engine
This is Rietveld 408576698