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

Side by Side Diff: tests/standalone/io/http_advanced_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_10_test.dart ('k') | tests/standalone/io/http_auth_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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 _requestHandlers["/expires2"] = _expires2Handler; 199 _requestHandlers["/expires2"] = _expires2Handler;
200 _requestHandlers["/contenttype1"] = _contentType1Handler; 200 _requestHandlers["/contenttype1"] = _contentType1Handler;
201 _requestHandlers["/contenttype2"] = _contentType2Handler; 201 _requestHandlers["/contenttype2"] = _contentType2Handler;
202 _requestHandlers["/cookie1"] = _cookie1Handler; 202 _requestHandlers["/cookie1"] = _cookie1Handler;
203 _requestHandlers["/cookie2"] = _cookie2Handler; 203 _requestHandlers["/cookie2"] = _cookie2Handler;
204 } 204 }
205 205
206 void dispatch(message, replyTo) { 206 void dispatch(message, replyTo) {
207 if (message.isStart) { 207 if (message.isStart) {
208 try { 208 try {
209 HttpServer.bind().then((server) { 209 HttpServer.bind("127.0.0.1", 0).then((server) {
210 _server = server; 210 _server = server;
211 _server.listen(_requestReceivedHandler); 211 _server.listen(_requestReceivedHandler);
212 replyTo.send(new IsolatedHttpServerStatus.started(_server.port), 212 replyTo.send(new IsolatedHttpServerStatus.started(_server.port),
213 null); 213 null);
214 }); 214 });
215 } catch (e) { 215 } catch (e) {
216 replyTo.send(new IsolatedHttpServerStatus.error(), null); 216 replyTo.send(new IsolatedHttpServerStatus.error(), null);
217 } 217 }
218 } else if (message.isStop) { 218 } else if (message.isStop) {
219 _server.close(); 219 _server.close();
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 void main() { 422 void main() {
423 testHost().then((_) { 423 testHost().then((_) {
424 return testExpires().then((_) { 424 return testExpires().then((_) {
425 return testContentType().then((_) { 425 return testContentType().then((_) {
426 return testCookies(); 426 return testCookies();
427 }); 427 });
428 }); 428 });
429 }); 429 });
430 } 430 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_10_test.dart ('k') | tests/standalone/io/http_auth_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698