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

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

Issue 11878015: Default constructor for dart:io Path now handles native Windows paths. Path() now does the same as… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't change tools/version.dart until the binaries are updated. Created 7 years, 11 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 // Regression test for http://dartbug.com/7191. 5 // Regression test for http://dartbug.com/7191.
6 6
7 // Starts a sub-process which in turn starts another sub-process and then closes 7 // Starts a sub-process which in turn starts another sub-process and then closes
8 // its standard output. If handles are incorrectly inherited on Windows, this 8 // its standard output. If handles are incorrectly inherited on Windows, this
9 // will lead to a situation where the stdout of the first sub-process is never 9 // will lead to a situation where the stdout of the first sub-process is never
10 // closed which will make this test hang. 10 // closed which will make this test hang.
11 11
12 import 'dart:io'; 12 import 'dart:io';
13 import 'dart:isolate'; 13 import 'dart:isolate';
14 14
15 main() { 15 main() {
16 var port = new ReceivePort(); 16 var port = new ReceivePort();
17 var options = new Options(); 17 var options = new Options();
18 var executable = options.executable; 18 var executable = options.executable;
19 var scriptDir = new Path.fromNative(options.script).directoryPath; 19 var scriptDir = new Path(options.script).directoryPath;
20 var script = scriptDir.append('regress_7191_script.dart').toNativePath(); 20 var script = scriptDir.append('regress_7191_script.dart').toNativePath();
21 Process.start(executable, [script]).then((process) { 21 Process.start(executable, [script]).then((process) {
22 process.stdin.write([0]); 22 process.stdin.write([0]);
23 process.stdout.onData = process.stdout.read; 23 process.stdout.onData = process.stdout.read;
24 process.stderr.onData = process.stderr.read; 24 process.stderr.onData = process.stderr.read;
25 process.stdout.onClosed = () { 25 process.stdout.onClosed = () {
26 process.stdin.write([0]); 26 process.stdin.write([0]);
27 }; 27 };
28 process.onExit = (exitCode) => port.close(); 28 process.onExit = (exitCode) => port.close();
29 }); 29 });
30 } 30 }
OLDNEW
« no previous file with comments | « tests/standalone/io/process_set_exit_code_test.dart ('k') | tests/standalone/io/secure_server_client_certificate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698