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

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

Issue 9958063: Rename Http test to be more specific. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | tests/standalone/src/io/HttpServerEarlyServerCloseTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/HttpServerEarlyCloseTest.dart
===================================================================
--- tests/standalone/src/io/HttpServerEarlyCloseTest.dart (revision 6086)
+++ tests/standalone/src/io/HttpServerEarlyCloseTest.dart (working copy)
@@ -1,39 +0,0 @@
-#import("dart:io");
-#import("dart:isolate");
-
-class Server {
- Server() {
- HttpServer server = new HttpServer();
- server.listen("127.0.0.1", 0);
- port = server.port;
- server.onRequest = (HttpRequest request, HttpResponse response) {
- new Timer(100, (timer) => server.close());
- };
- server.onError = (Object exception) {
- Expect.fail("Close should not give an error.");
- };
- }
- int port;
-}
-
-class Client {
- Client(int port) {
- ReceivePort r = new ReceivePort();
- HttpClient client = new HttpClient();
- HttpClientConnection c = client.get("127.0.0.1", port, "/");
- c.onRequest = (HttpClientRequest request) {
- request.outputStream.close();
- };
- c.onResponse = (HttpClientResponse response) {
- Expect.fail("Response should not be given, as not data was returned.");
- };
- c.onError = (Object exception) {
- r.close();
- };
- }
-}
-
-main() {
- Server server = new Server();
- new Client(server.port);
-}
« no previous file with comments | « no previous file | tests/standalone/src/io/HttpServerEarlyServerCloseTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698