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

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

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 years, 10 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_broken_pipe_test.dart
diff --git a/tests/standalone/io/process_broken_pipe_test.dart b/tests/standalone/io/process_broken_pipe_test.dart
index 1f4278997dda72cdcefe569b45bcb4b563b8d561..3833158379f4f9f0e4c48f8dd29dc93c07e43d14 100644
--- a/tests/standalone/io/process_broken_pipe_test.dart
+++ b/tests/standalone/io/process_broken_pipe_test.dart
@@ -5,6 +5,7 @@
// Process test program to test closed stdin from child process.
import "dart:io";
+import "dart:isolate";
import "process_test_util.dart";
@@ -12,17 +13,18 @@ main() {
// Running dart without arguments makes it close right away.
var future = Process.start(new Options().executable, []);
future.then((process) {
- // Ignore error on stdin.
- process.stdin.onError = (e) => null;
+ process.stdin.done.catchError((e) {
+ // Accept errors on stdin.
+ });
// Drain stdout and stderr.
- process.stdout.onData = () => process.stdout.read();
- process.stderr.onData = () => process.stderr.read();
+ process.stdout.listen((_) {});
+ process.stderr.listen((_) {});
// Write to the stdin after the process is terminated to test
// writing to a broken pipe.
- process.onExit = (code) {
- Expect.isFalse(process.stdin.write([0]));
- };
+ process.exitCode.then((code) {
+ process.stdin.add([0]);
+ });
});
}
« no previous file with comments | « tests/standalone/io/mime_multipart_parser_test.dart ('k') | tests/standalone/io/process_check_arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698