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

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

Issue 14640008: Change the signature for all network bind calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments by whesse@ Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/http_auth_test.dart ('k') | tests/standalone/io/http_body_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 _requestHandlers = new Map(); 149 _requestHandlers = new Map();
150 _requestHandlers["/echo"] = _echoHandler; 150 _requestHandlers["/echo"] = _echoHandler;
151 _requestHandlers["/0123456789"] = _zeroToTenHandler; 151 _requestHandlers["/0123456789"] = _zeroToTenHandler;
152 _requestHandlers["/reasonformoving"] = _reasonForMovingHandler; 152 _requestHandlers["/reasonformoving"] = _reasonForMovingHandler;
153 _requestHandlers["/host"] = _hostHandler; 153 _requestHandlers["/host"] = _hostHandler;
154 } 154 }
155 155
156 void dispatch(var message, SendPort replyTo) { 156 void dispatch(var message, SendPort replyTo) {
157 if (message.isStart) { 157 if (message.isStart) {
158 try { 158 try {
159 HttpServer.bind().then((server) { 159 HttpServer.bind("127.0.0.1", 0).then((server) {
160 _server = server; 160 _server = server;
161 _server.listen(_requestReceivedHandler); 161 _server.listen(_requestReceivedHandler);
162 replyTo.send(new TestServerStatus.started(_server.port), null); 162 replyTo.send(new TestServerStatus.started(_server.port), null);
163 }); 163 });
164 } catch (e) { 164 } catch (e) {
165 replyTo.send(new TestServerStatus.error(), null); 165 replyTo.send(new TestServerStatus.error(), null);
166 } 166 }
167 } else if (message.isStop) { 167 } else if (message.isStop) {
168 _server.close(); 168 _server.close();
169 port.close(); 169 port.close();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 void main() { 313 void main() {
314 testStartStop(); 314 testStartStop();
315 testGET(); 315 testGET();
316 testPOST(true); 316 testPOST(true);
317 testPOST(false); 317 testPOST(false);
318 test404(); 318 test404();
319 testReasonPhrase(); 319 testReasonPhrase();
320 } 320 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_auth_test.dart ('k') | tests/standalone/io/http_body_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698