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

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

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 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 'dart:async'; 10 import 'dart:async';
11 import 'dart:io'; 11 import 'dart:io';
12 12
13 const CLIENT_SCRIPT = "http_server_close_response_after_error_client.dart"; 13 const CLIENT_SCRIPT = "http_server_close_response_after_error_client.dart";
14 14
15 void main() { 15 void main() {
16 HttpServer.bind("127.0.0.1", 0) 16 HttpServer.bind("127.0.0.1", 0)
17 .then((server) { 17 .then((server) {
18 server.listen( 18 server.listen(
19 (request) { 19 (request) {
20 request.listen( 20 request.listen(
21 null, 21 null,
22 onError: (e) {}, 22 onError: (e) {},
23 onDone: () { 23 onDone: () {
24 request.response.close(); 24 request.response.close();
25 }); 25 });
26 }); 26 });
27 var path = new Uri.file(Platform.script);
27 Process.run(Platform.executable, 28 Process.run(Platform.executable,
28 [Platform.script.resolve(CLIENT_SCRIPT).toString(), 29 [path.resolve(CLIENT_SCRIPT).toString(),
29 server.port.toString()]) 30 server.port.toString()])
30 .then((result) { 31 .then((result) {
31 if (result.exitCode != 0) throw "Bad exit code"; 32 if (result.exitCode != 0) throw "Bad exit code";
32 server.close(); 33 server.close();
33 }); 34 });
34 }); 35 });
35 } 36 }
36 37
OLDNEW
« no previous file with comments | « tests/standalone/io/http_proxy_test.dart ('k') | tests/standalone/io/http_server_early_client_close2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698