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

Unified Diff: tests/standalone/io/directory_list_nonexistent_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
Index: tests/standalone/io/directory_list_nonexistent_test.dart
diff --git a/tests/standalone/io/directory_list_nonexistent_test.dart b/tests/standalone/io/directory_list_nonexistent_test.dart
index b5149248deb21f48e8fbca20d5bf626a749fce9f..387f68227de9c6d680cb69b88d5453da73c15f82 100644
--- a/tests/standalone/io/directory_list_nonexistent_test.dart
+++ b/tests/standalone/io/directory_list_nonexistent_test.dart
@@ -7,24 +7,25 @@
// TODO(7157): Merge this test into directory_test.dart testListNonExistent()
// when it no longer crashes on Windows, when issue 7157 is resolved.
-import "package:expect/expect.dart";
import "dart:io";
-import "dart:isolate";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
void testListNonExistent() {
- var keepAlive = new ReceivePort();
+ asyncStart();
new Directory("").createTemp().then((d) {
d.delete().then((ignore) {
Expect.throws(() => d.listSync(), (e) => e is DirectoryException);
Expect.throws(() => d.listSync(recursive: true),
(e) => e is DirectoryException);
- keepAlive.close();
+ asyncEnd();
});
});
}
void testListTooLongName() {
- var keepAlive = new ReceivePort();
+ asyncStart();
new Directory("").createTemp().then((d) {
var subDirName = 'subdir';
var subDir = new Directory("${d.path}/$subDirName");
@@ -42,7 +43,7 @@ void testListTooLongName() {
Expect.throws(() => long.listSync(recursive: true),
(e) => e is DirectoryException);
d.deleteSync(recursive: true);
- keepAlive.close();
+ asyncEnd();
});
});
}
« no previous file with comments | « tests/standalone/io/directory_invalid_arguments_test.dart ('k') | tests/standalone/io/directory_list_pause_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698