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

Side by Side Diff: tests/standalone/io/http_server_early_client_close_test.dart

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #import("dart:io"); 1 #import("dart:io");
2 #import("dart:isolate"); 2 #import("dart:isolate");
3 3
4 void sendData(List<int> data, int port) { 4 void sendData(List<int> data, int port) {
5 Socket socket = new Socket("127.0.0.1", port); 5 Socket socket = new Socket("127.0.0.1", port);
6 socket.onConnect = () { 6 socket.onConnect = () {
7 socket.onData = () { 7 socket.onData = () {
8 Expect.fail("No data response was expected"); 8 Expect.fail("No data response was expected");
9 }; 9 };
10 socket.outputStream.onNoPendingWrites = () { 10 socket.outputStream.onNoPendingWrites = () {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 "Connection closed before full body was received", 73 "Connection closed before full body was received",
74 expectRequest: true); 74 expectRequest: true);
75 add("GET / HTTP/1.1\r\nContent-Length: 100\r\n\r\n1", 75 add("GET / HTTP/1.1\r\nContent-Length: 100\r\n\r\n1",
76 "Connection closed before full body was received", 76 "Connection closed before full body was received",
77 expectRequest: true); 77 expectRequest: true);
78 78
79 79
80 HttpServer server = new HttpServer(); 80 HttpServer server = new HttpServer();
81 server.listen("127.0.0.1", 0); 81 server.listen("127.0.0.1", 0);
82 void runTest(Iterator it) { 82 void runTest(Iterator it) {
83 if (it.hasNext()) { 83 if (it.hasNext) {
84 it.next().execute(server).then((_) => runTest(it)); 84 it.next().execute(server).then((_) => runTest(it));
85 } else { 85 } else {
86 server.close(); 86 server.close();
87 } 87 }
88 } 88 }
89 runTest(tests.iterator()); 89 runTest(tests.iterator());
90 } 90 }
91 91
92 void main() { 92 void main() {
93 testEarlyClose(); 93 testEarlyClose();
94 } 94 }
OLDNEW
« no previous file with comments | « tests/corelib/string_pattern_test.dart ('k') | tests/standalone/io/test_runner_exit_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698