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

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

Issue 2753743005: mediaview: Hack to avoid Files app to freeze soon after login. (Closed)
Patch Set: 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 df9f467a297502cc77c426fed74d69de636d8d30..6c62db36ea2965c1801a85be3416c48f5db419ee 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
@@ -315,6 +315,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,
mojom::ChangeType::CHANGED);
@@ -357,6 +365,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,
mojom::ChangeType::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