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

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

Issue 10891020: Update almost all tests (except co19) to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 3 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/fuzz_support.dart ('k') | tests/standalone/io/http_basic_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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("dart:isolate"); 10 #import("dart:isolate");
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 void dispatch(message, replyTo) { 214 void dispatch(message, replyTo) {
215 if (message.isStart) { 215 if (message.isStart) {
216 _server = new HttpServer(); 216 _server = new HttpServer();
217 try { 217 try {
218 _server.listen("127.0.0.1", 0); 218 _server.listen("127.0.0.1", 0);
219 _server.defaultRequestHandler = (HttpRequest req, HttpResponse rsp) { 219 _server.defaultRequestHandler = (HttpRequest req, HttpResponse rsp) {
220 _requestReceivedHandler(req, rsp); 220 _requestReceivedHandler(req, rsp);
221 }; 221 };
222 replyTo.send(new TestServerStatus.started(_server.port), null); 222 replyTo.send(new TestServerStatus.started(_server.port), null);
223 } catch (var e) { 223 } catch (e) {
224 replyTo.send(new TestServerStatus.error(), null); 224 replyTo.send(new TestServerStatus.error(), null);
225 } 225 }
226 } else if (message.isStop) { 226 } else if (message.isStop) {
227 _server.close(); 227 _server.close();
228 port.close(); 228 port.close();
229 replyTo.send(new TestServerStatus.stopped(), null); 229 replyTo.send(new TestServerStatus.stopped(), null);
230 } else if (message.isChunkedEncoding) { 230 } else if (message.isChunkedEncoding) {
231 _chunkedEncoding = true; 231 _chunkedEncoding = true;
232 } 232 }
233 } 233 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 }); 404 });
405 testServerMain.start(); 405 testServerMain.start();
406 } 406 }
407 407
408 void main() { 408 void main() {
409 testHost(); 409 testHost();
410 testExpires(); 410 testExpires();
411 testContentType(); 411 testContentType();
412 testCookies(); 412 testCookies();
413 } 413 }
OLDNEW
« no previous file with comments | « tests/standalone/io/fuzz_support.dart ('k') | tests/standalone/io/http_basic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698