Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc

Issue 2726373002: mediaview: Hack to avoid Files app to freeze soon after login. (Closed)
Patch Set: Remove unnecessary branch. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698