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

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

Issue 23886004: Update dart:io tests to use asyncStart/asyncEnd (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 3 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
« no previous file with comments | « tests/standalone/io/platform_test.dart ('k') | tests/standalone/io/process_non_ascii_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb60471e52ae1352a6dafbc0a5fd30f34276fbd7..c36ef8c8ddc5038ca3158d7399cf0ec56dd61eae 100644
--- a/tests/standalone/io/process_environment_test.dart
+++ b/tests/standalone/io/process_environment_test.dart
@@ -2,9 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import "package:expect/expect.dart";
import "dart:io";
-import "dart:isolate";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
+
import "process_test_util.dart";
runEnvironmentProcess(Map environment, name, includeParent, callback) {
@@ -24,7 +26,7 @@ runEnvironmentProcess(Map environment, name, includeParent, callback) {
}
testEnvironment() {
- var donePort = new ReceivePort();
+ asyncStart();
Map env = Platform.environment;
Expect.isFalse(env.isEmpty);
// Check that some value in the environment stays the same when passed
@@ -42,7 +44,7 @@ testEnvironment() {
copy[name] = 'value';
runEnvironmentProcess(copy, name, true, (output) {
Expect.isTrue(output.startsWith('value'));
- donePort.close();
+ asyncEnd();
});
});
// Only check one value to not spin up too many processes testing the
@@ -52,13 +54,13 @@ testEnvironment() {
}
testNoIncludeEnvironment() {
- var donePort = new ReceivePort();
+ asyncStart();
var env = Platform.environment;
Expect.isTrue(env.containsKey('PATH'));
env.remove('PATH');
runEnvironmentProcess(env, "PATH", false, (output) {
- donePort.close();
Expect.isTrue(output.startsWith("null"));
+ asyncEnd();
});
}
« no previous file with comments | « tests/standalone/io/platform_test.dart ('k') | tests/standalone/io/process_non_ascii_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698