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

Unified Diff: pkg/watcher/test/utils.dart

Issue 21628002: Re-implement directory polling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Split out async queue. Created 7 years, 5 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 | « pkg/watcher/test/no_subscription_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/watcher/test/utils.dart
diff --git a/pkg/watcher/test/utils.dart b/pkg/watcher/test/utils.dart
index 5053b76ad4f3dcba916aeaeae5ec08aea327a900..65d47197d7afa1e387944a5e4ae92e2866cbd766 100644
--- a/pkg/watcher/test/utils.dart
+++ b/pkg/watcher/test/utils.dart
@@ -84,7 +84,7 @@ DirectoryWatcher createWatcher({bool waitForReady}) {
// Wait until the scan is finished so that we don't miss changes to files
// that could occur before the scan completes.
if (waitForReady != false) {
- schedule(() => _watcher.ready);
+ schedule(() => _watcher.ready, "wait for watcher to be ready");
}
currentSchedule.onComplete.schedule(() {
@@ -107,7 +107,7 @@ void expectEvent(ChangeType type, String path) {
// Schedule it so that later file modifications don't occur until after this
// event is received.
- schedule(() => future);
+ schedule(() => future, "wait for $type event");
}
void expectAddEvent(String path) {
@@ -149,14 +149,14 @@ void writeFile(String path, {String contents, bool updateModified}) {
var milliseconds = _mockFileModificationTimes.putIfAbsent(path, () => 0);
_mockFileModificationTimes[path]++;
}
- });
+ }, "write file $path");
}
/// Schedules deleting a file in the sandbox at [path].
void deleteFile(String path) {
schedule(() {
new File(p.join(_sandboxDir, path)).deleteSync();
- });
+ }, "delete file $path");
}
/// Schedules renaming a file in the sandbox from [from] to [to].
@@ -172,7 +172,7 @@ void renameFile(String from, String to) {
// Manually update the mock modification time for the file.
var milliseconds = _mockFileModificationTimes.putIfAbsent(to, () => 0);
_mockFileModificationTimes[to]++;
- });
+ }, "rename file $from to $to");
}
/// A [Matcher] for [WatchEvent]s.
« no previous file with comments | « pkg/watcher/test/no_subscription_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698