| Index: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
|
| diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
|
| index fe09ee9f0ab1b10ca4ca28d56fbf575a75e1956f..3ee78a9f88972c6cf102d22144e93d3acc7fa531 100644
|
| --- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
|
| +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
|
| @@ -316,6 +316,14 @@ TEST_F(ArcDocumentsProviderRootTest, WatchChanged) {
|
| run_loop.Run();
|
| }
|
|
|
| + // Even if AddWatcher() returns, the watch may not have started. In order to
|
| + // make installation finish we run the message loop until idle. This depends
|
| + // on the behavior of FakeFileSystemInstance.
|
| + //
|
| + // TODO(crbug.com/698624): Remove the hack to make AddWatcher() return
|
| + // immediately.
|
| + base::RunLoop().RunUntilIdle();
|
| +
|
| EXPECT_EQ(0, num_called);
|
| fake_file_system_.TriggerWatchers(kAuthority, kDirSpec.document_id,
|
| storage::WatcherManager::CHANGED);
|
| @@ -358,6 +366,14 @@ TEST_F(ArcDocumentsProviderRootTest, WatchDeleted) {
|
| run_loop.Run();
|
| }
|
|
|
| + // Even if AddWatcher() returns, the watch may not have started. In order to
|
| + // make installation finish we run the message loop until idle. This depends
|
| + // on the behavior of FakeFileSystemInstance.
|
| + //
|
| + // TODO(crbug.com/698624): Remove the hack to make AddWatcher() return
|
| + // immediately.
|
| + base::RunLoop().RunUntilIdle();
|
| +
|
| EXPECT_EQ(0, num_called);
|
| fake_file_system_.TriggerWatchers(kAuthority, kDirSpec.document_id,
|
| storage::WatcherManager::DELETED);
|
|
|