summaryrefslogtreecommitdiffstats
path: root/base/directory_watcher_unittest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 08:45:18 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 08:45:18 +0000
commit332eeab52b9f461f994a8322c1d7fe66e90560f5 (patch)
treebc63ca9cde0a97198671b30b182a1e41063744da /base/directory_watcher_unittest.cc
parent39834d692a6f7eab24b30a83327da45baa949bd8 (diff)
downloadchromium_src-332eeab52b9f461f994a8322c1d7fe66e90560f5.zip
chromium_src-332eeab52b9f461f994a8322c1d7fe66e90560f5.tar.gz
chromium_src-332eeab52b9f461f994a8322c1d7fe66e90560f5.tar.bz2
Fix hang in DirectoryWatcherTest.WatchCreatedDirectory on Windows.
TBR=evan Review URL: http://codereview.chromium.org/109008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/directory_watcher_unittest.cc')
-rw-r--r--base/directory_watcher_unittest.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/base/directory_watcher_unittest.cc b/base/directory_watcher_unittest.cc
index 35833b6..014665c 100644
--- a/base/directory_watcher_unittest.cc
+++ b/base/directory_watcher_unittest.cc
@@ -332,13 +332,15 @@ TEST_F(DirectoryWatcherTest, WatchCreatedDirectory) {
SetExpectedNumberOfNotifiedDelegates(1);
FilePath subdir(CreateTestDirDirectoryASCII("SubDir", true));
+ // Create a file inside the subdir to force Windows to fire notifications.
+ ASSERT_TRUE(WriteTestFile(subdir.AppendASCII("test_file"), "some content"));
VerifyExpectedNumberOfNotifiedDelegates();
delegate.reset();
- // Write a file to the subdir.
+ // Verify that changes inside the subdir are noticed.
SetExpectedNumberOfNotifiedDelegates(1);
- ASSERT_TRUE(WriteTestFile(subdir.AppendASCII("test_file"), "some content"));
+ ASSERT_TRUE(WriteTestFile(subdir.AppendASCII("test_file"), "other content"));
VerifyExpectedNumberOfNotifiedDelegates();
}