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

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

Issue 23668006: Run file system operations in file_system_watcher_test after a runAsync delay. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_system_watcher_test.dart
diff --git a/tests/standalone/io/file_system_watcher_test.dart b/tests/standalone/io/file_system_watcher_test.dart
index b7a4dc09879b0a3db4c50e76700346f22a5b2da6..d94b70ccee1edeff8aaac54ab205270b28d99042 100644
--- a/tests/standalone/io/file_system_watcher_test.dart
+++ b/tests/standalone/io/file_system_watcher_test.dart
@@ -29,7 +29,7 @@ void testWatchCreateFile() {
throw e;
});
- file.createSync();
+ runAsync(file.createSync);
}
@@ -54,7 +54,7 @@ void testWatchModifyFile() {
throw e;
});
- file.writeAsStringSync('a');
+ runAsync(() => file.writeAsStringSync('a'));
}
@@ -80,7 +80,7 @@ void testWatchMoveFile() {
throw e;
});
- file.renameSync(dir.path + '/file2');
+ runAsync(() => file.renameSync(dir.path + '/file2'));
}
@@ -105,7 +105,7 @@ void testWatchDeleteFile() {
throw e;
});
- file.deleteSync();
+ runAsync(file.deleteSync);
}
@@ -128,8 +128,10 @@ void testWatchOnlyModifyFile() {
throw e;
});
- file.createSync();
- file.writeAsStringSync('a');
+ runAsync(() {
+ file.createSync();
+ file.writeAsStringSync('a');
+ });
}
@@ -203,7 +205,7 @@ void testWatchRecursive() {
throw e;
});
- file.createSync();
+ runAsync(file.createSync());
}
@@ -226,7 +228,7 @@ void testWatchNonRecursive() {
throw e;
});
- file.createSync();
+ runAsync(file.createSync);
new Timer(const Duration(milliseconds: 300), () {
sub.cancel();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698