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

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

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Dart_GetType Created 7 years, 6 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) 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 // Process test program to test process communication. 5 // Process test program to test process communication.
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import "dart:async"; 8 import "dart:async";
9 import "dart:io"; 9 import "dart:io";
10 import "dart:isolate"; 10 import "dart:isolate";
11 11
12 main() { 12 main() {
13 var port = new ReceivePort(); 13 var port = new ReceivePort();
14 Expect.isTrue(pid > 0); 14 Expect.isTrue(pid > 0);
15 var futures = []; 15 var futures = [];
16 futures.add(Process.start(new Options().executable,['--version'])); 16 futures.add(Process.start(Platform.executable,['--version']));
17 futures.add(Process.run(new Options().executable,['--version'])); 17 futures.add(Process.run(Platform.executable,['--version']));
18 Future.wait(futures).then((results) { 18 Future.wait(futures).then((results) {
19 Expect.isTrue(results[0].pid > 0); 19 Expect.isTrue(results[0].pid > 0);
20 Expect.isTrue(results[1].pid > 0); 20 Expect.isTrue(results[1].pid > 0);
21 Expect.equals(0, results[1].exitCode); 21 Expect.equals(0, results[1].exitCode);
22 results[0].exitCode.then((exitCode) { 22 results[0].exitCode.then((exitCode) {
23 Expect.equals(0, exitCode); 23 Expect.equals(0, exitCode);
24 port.close(); 24 port.close();
25 }); 25 });
26 }); 26 });
27 } 27 }
OLDNEW
« no previous file with comments | « tests/standalone/io/process_non_ascii_test.dart ('k') | tests/standalone/io/process_run_output_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698