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

Unified Diff: tests/standalone/io/process_environment_test.dart

Issue 10392023: Change dart:io to use Future for one-shot operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding stable test binaries Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/process_environment_test.dart
diff --git a/tests/standalone/io/process_environment_test.dart b/tests/standalone/io/process_environment_test.dart
index 26d5f4b23efa137363aff9dec6daa165dbb5187d..1a2009ee24ea833fbb1da0b9eff3298df6be4675 100644
--- a/tests/standalone/io/process_environment_test.dart
+++ b/tests/standalone/io/process_environment_test.dart
@@ -14,14 +14,10 @@ runEnvironmentProcess(Map environment, name, callback) {
if (!new File(printEnv).existsSync()) {
printEnv = '../$printEnv';
}
- var process = new Process.run(dartExecutable,
- [printEnv, name],
- options,
- (exit, out, err) {
- Expect.equals(0, exit);
- callback(out);
+ Process.run(dartExecutable, [printEnv, name], options).then((result) {
+ Expect.equals(0, result.exitCode);
+ callback(result.stdout);
});
- process.onError = (e) => Expect.fail("Unexpected process start error: '$e'");
}
testEnvironment() {
« no previous file with comments | « tests/standalone/io/process_check_arguments_test.dart ('k') | tests/standalone/io/process_exit_negative_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698