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

Side by Side Diff: tests/standalone/io/http_read_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
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 void dispatch(message, SendPort replyTo) { 123 void dispatch(message, SendPort replyTo) {
124 if (message.isStart) { 124 if (message.isStart) {
125 _server = new HttpServer(); 125 _server = new HttpServer();
126 try { 126 try {
127 _server.listen("127.0.0.1", 0); 127 _server.listen("127.0.0.1", 0);
128 _server.defaultRequestHandler = (HttpRequest req, HttpResponse rsp) { 128 _server.defaultRequestHandler = (HttpRequest req, HttpResponse rsp) {
129 _requestReceivedHandler(req, rsp); 129 _requestReceivedHandler(req, rsp);
130 }; 130 };
131 replyTo.send(new TestServerStatus.started(_server.port), null); 131 replyTo.send(new TestServerStatus.started(_server.port), null);
132 } catch (var e) { 132 } catch (e) {
133 replyTo.send(new TestServerStatus.error(), null); 133 replyTo.send(new TestServerStatus.error(), null);
134 } 134 }
135 } else if (message.isStop) { 135 } else if (message.isStop) {
136 _server.close(); 136 _server.close();
137 port.close(); 137 port.close();
138 replyTo.send(new TestServerStatus.stopped(), null); 138 replyTo.send(new TestServerStatus.stopped(), null);
139 } else if (message.isChunkedEncoding) { 139 } else if (message.isChunkedEncoding) {
140 _chunkedEncoding = true; 140 _chunkedEncoding = true;
141 } 141 }
142 } 142 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 testServerMain.start(); 262 testServerMain.start();
263 } 263 }
264 264
265 void main() { 265 void main() {
266 testReadInto(true); 266 testReadInto(true);
267 testReadInto(false); 267 testReadInto(false);
268 testReadShort(true); 268 testReadShort(true);
269 testReadShort(false); 269 testReadShort(false);
270 } 270 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_basic_test.dart ('k') | tests/standalone/io/read_into_const_list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698