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

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

Issue 11091070: Change Process.start to return a future that completes with a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Restructure to get rid of _onStart and _onError Created 8 years, 2 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_segfault_test.dart
diff --git a/tests/standalone/io/process_segfault_test.dart b/tests/standalone/io/process_segfault_test.dart
index 53ffaab9795fff04d955a2723d1dc37a2caa77e9..541a4f6f0d2995fd92fc92f096dd1d3f5208f779 100644
--- a/tests/standalone/io/process_segfault_test.dart
+++ b/tests/standalone/io/process_segfault_test.dart
@@ -9,13 +9,14 @@
#source("process_test_util.dart");
testExit() {
- Process process = Process.start(getProcessTestFileName(),
- const ["0", "0", "1", "1"]);
-
- process.onExit = (int exitCode) {
- Expect.isTrue(exitCode != 0);
- process.close();
- };
+ var future = Process.start(getProcessTestFileName(),
+ const ["0", "0", "1", "1"]);
+ future.then((process) {
+ process.onExit = (int exitCode) {
+ Expect.isTrue(exitCode != 0);
+ process.close();
+ };
+ });
}
« no previous file with comments | « tests/standalone/io/process_kill_unstarted_test.dart ('k') | tests/standalone/io/process_start_exception_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698