diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-01 19:57:52 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-01 19:57:52 +0000 |
commit | 2564b5df1c07c233e172964be7966029d9d45c3d (patch) | |
tree | a60a780a1e51ce9ae1724621d902ad680ddb4f8f /chrome/common/service_process_util_unittest.cc | |
parent | e48869a1cbcc07f09bd9d8c6f9e17bf506d86fa6 (diff) | |
download | chromium_src-2564b5df1c07c233e172964be7966029d9d45c3d.zip chromium_src-2564b5df1c07c233e172964be7966029d9d45c3d.tar.gz chromium_src-2564b5df1c07c233e172964be7966029d9d45c3d.tar.bz2 |
Fixes up the race condition that exists with deleting a file vs watching it.
The tests created a file and attempted to hook a watcher on it on a separate thread
but it was deleting it before the thread had a chance to watch it.
BUG=77217, 77064, 69641, 76987
TEST=BUILD
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=79307
Review URL: http://codereview.chromium.org/6676118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_unittest.cc')
-rw-r--r-- | chrome/common/service_process_util_unittest.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc index 950953d..ab55bb5 100644 --- a/chrome/common/service_process_util_unittest.cc +++ b/chrome/common/service_process_util_unittest.cc @@ -368,7 +368,7 @@ class ServiceProcessStateFileManipulationTest : public ::testing::Test { NULL)); loop_.PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, - TestTimeouts::large_test_timeout_ms()); + TestTimeouts::action_max_timeout_ms()); } bool MakeABundle(const FilePath& dst, @@ -484,8 +484,7 @@ void TrashFunc(const FilePath& src) { EXPECT_EQ(status, noErr) << "FSMoveObjectToTrashSync " << status; } -// Disabled because of race in FilePathWatcher. http://crbug.com/77326 -TEST_F(ServiceProcessStateFileManipulationTest, DISABLED_DeleteFile) { +TEST_F(ServiceProcessStateFileManipulationTest, DeleteFile) { GetIOMessageLoopProxy()->PostTask( FROM_HERE, NewRunnableFunction(&DeleteFunc, executable_path())); @@ -494,8 +493,7 @@ TEST_F(ServiceProcessStateFileManipulationTest, DISABLED_DeleteFile) { ASSERT_TRUE(mock_launchd()->delete_called()); } -// Disabled because of race in FilePathWatcher. http://crbug.com/77326 -TEST_F(ServiceProcessStateFileManipulationTest, DISABLED_DeleteBundle) { +TEST_F(ServiceProcessStateFileManipulationTest, DeleteBundle) { GetIOMessageLoopProxy()->PostTask( FROM_HERE, NewRunnableFunction(&DeleteFunc, bundle_path())); @@ -538,8 +536,7 @@ TEST_F(ServiceProcessStateFileManipulationTest, TrashBundle) { ASSERT_TRUE(file_util::Delete(file_path, true)); } -// http://crbug.com/77391 -TEST_F(ServiceProcessStateFileManipulationTest, FLAKY_ChangeAttr) { +TEST_F(ServiceProcessStateFileManipulationTest, ChangeAttr) { ScopedAttributesRestorer restorer(bundle_path(), 0777); GetIOMessageLoopProxy()->PostTask( FROM_HERE, |