Index: base/files/file_path_watcher_unittest.cc |
diff --git a/base/files/file_path_watcher_unittest.cc b/base/files/file_path_watcher_unittest.cc |
index 6bfa71f0545c430dd094622587cba2aff566cf60..a40e4858b4bea7d70a0f25896d3d162dbeafa329 100644 |
--- a/base/files/file_path_watcher_unittest.cc |
+++ b/base/files/file_path_watcher_unittest.cc |
@@ -196,6 +196,10 @@ class FilePathWatcherTest : public testing::Test { |
bool WaitForEvents() WARN_UNUSED_RESULT { |
collector_->Reset(); |
+ // Make sure we timeout if we don't get notified. |
+ loop_.PostDelayedTask(FROM_HERE, |
+ MessageLoop::QuitWhenIdleClosure(), |
+ TestTimeouts::action_timeout()); |
RunLoop().Run(); |
return collector_->Success(); |
} |