diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 07:35:56 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 07:35:56 +0000 |
commit | b4934c029795bf7cf0829fd6c27014c2fc931742 (patch) | |
tree | 18eb2881e9bc4124c06796e8c101e3de474955b2 /chrome | |
parent | b4384a798aef3f2e52c34d733a9af2db792c6c1d (diff) | |
download | chromium_src-b4934c029795bf7cf0829fd6c27014c2fc931742.zip chromium_src-b4934c029795bf7cf0829fd6c27014c2fc931742.tar.gz chromium_src-b4934c029795bf7cf0829fd6c27014c2fc931742.tar.bz2 |
Add more sync calls to try to make the FileWatcher test not
flaky on OSX.
BUG=38188
Review URL: http://codereview.chromium.org/1045004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/file_watcher_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/file_watcher_unittest.cc b/chrome/browser/file_watcher_unittest.cc index 5db2138..c6fca6c 100644 --- a/chrome/browser/file_watcher_unittest.cc +++ b/chrome/browser/file_watcher_unittest.cc @@ -69,6 +69,7 @@ class FileWatcherTest : public testing::Test { LOG(INFO) << "WriteTestFile"; int write_size = file_util::WriteFile(test_file(), content.c_str(), content.length()); + SyncIfPOSIX(); return write_size == static_cast<int>(content.length()); } @@ -159,7 +160,6 @@ TEST_F(FileWatcherTest, MAYBE(NewFile)) { // Verify that modifying the file is caught. TEST_F(FileWatcherTest, MAYBE(ModifiedFile)) { ASSERT_TRUE(WriteTestFile("content")); - SyncIfPOSIX(); FileWatcher watcher; TestDelegate delegate(this); @@ -173,7 +173,6 @@ TEST_F(FileWatcherTest, MAYBE(ModifiedFile)) { TEST_F(FileWatcherTest, MAYBE(DeletedFile)) { ASSERT_TRUE(WriteTestFile("content")); - SyncIfPOSIX(); FileWatcher watcher; TestDelegate delegate(this); @@ -182,6 +181,7 @@ TEST_F(FileWatcherTest, MAYBE(DeletedFile)) { // Now make sure we get notified if the file is deleted. SetExpectedNumberOfNotifiedDelegates(1); file_util::Delete(test_file(), false); + SyncIfPOSIX(); VerifyExpectedNumberOfNotifiedDelegates(); } |