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

Side by Side Diff: tests/standalone/io/http_basic_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/http_advanced_test.dart ('k') | tests/standalone/io/http_read_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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 void dispatch(var message, SendPort replyTo) { 162 void dispatch(var message, SendPort replyTo) {
163 if (message.isStart) { 163 if (message.isStart) {
164 _server = new HttpServer(); 164 _server = new HttpServer();
165 try { 165 try {
166 _server.listen("127.0.0.1", 0); 166 _server.listen("127.0.0.1", 0);
167 _server.defaultRequestHandler = (HttpRequest req, HttpResponse rsp) { 167 _server.defaultRequestHandler = (HttpRequest req, HttpResponse rsp) {
168 _requestReceivedHandler(req, rsp); 168 _requestReceivedHandler(req, rsp);
169 }; 169 };
170 replyTo.send(new TestServerStatus.started(_server.port), null); 170 replyTo.send(new TestServerStatus.started(_server.port), null);
171 } catch (var e) { 171 } catch (e) {
172 replyTo.send(new TestServerStatus.error(), null); 172 replyTo.send(new TestServerStatus.error(), null);
173 } 173 }
174 } else if (message.isStop) { 174 } else if (message.isStop) {
175 _server.close(); 175 _server.close();
176 port.close(); 176 port.close();
177 replyTo.send(new TestServerStatus.stopped(), null); 177 replyTo.send(new TestServerStatus.stopped(), null);
178 } else if (message.isChunkedEncoding) { 178 } else if (message.isChunkedEncoding) {
179 _chunkedEncoding = true; 179 _chunkedEncoding = true;
180 } 180 }
181 } 181 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 306 }
307 307
308 void main() { 308 void main() {
309 testStartStop(); 309 testStartStop();
310 testGET(); 310 testGET();
311 testPOST(true); 311 testPOST(true);
312 testPOST(false); 312 testPOST(false);
313 test404(); 313 test404();
314 testReasonPhrase(); 314 testReasonPhrase();
315 } 315 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_advanced_test.dart ('k') | tests/standalone/io/http_read_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698