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

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

Issue 47723003: Correctly pass errors to the stream, when watching file system entities. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « runtime/bin/file_patch.dart ('k') | 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 4540b608f2d25641304806594088fa208c348976..0ea8f0be1d9514fc493665759e5d04bfa498045c 100644
--- a/tests/standalone/io/file_system_watcher_test.dart
+++ b/tests/standalone/io/file_system_watcher_test.dart
@@ -256,6 +256,18 @@ void testWatchNonRecursive() {
}
+void testWatchNonExisting() {
+ asyncStart();
+ new Directory('__some_none_existing_dir__').watch()
+ .listen((_) {
+ Expect.fail('unexpected error');
+ }, onError: (e) {
+ asyncEnd();
+ Expect.isTrue(e is FileSystemException);
+ });
+}
+
+
void main() {
if (!FileSystemEntity.isWatchSupported) return;
testWatchCreateFile();
@@ -266,4 +278,5 @@ void main() {
testWatchOnlyModifyFile();
testMultipleEvents();
testWatchNonRecursive();
+ testWatchNonExisting();
}
« no previous file with comments | « runtime/bin/file_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698