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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_test.cc

Issue 2751913004: arc: Fix race conditon when Play Store is started too early. (Closed)
Patch Set: nits 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/ui/app_list/arc/arc_app_test.h ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/arc/arc_app_test.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_test.cc b/chrome/browser/ui/app_list/arc/arc_app_test.cc
index 94ad8c212e71cd38e092189eb1a0664089270df4..8fb88d3a698acb2d1e1a0c890aaf8fdaaff3e0f4 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_test.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_test.cc
@@ -97,9 +97,8 @@ void ArcAppTest::SetUp(Profile* profile) {
arc_app_list_pref_ = ArcAppListPrefs::Get(profile_);
DCHECK(arc_app_list_pref_);
- base::RunLoop run_loop;
- arc_app_list_pref_->SetDefaltAppsReadyCallback(run_loop.QuitClosure());
- run_loop.Run();
+ if (wait_default_apps_)
+ WaitForDefaultApps();
// Check initial conditions.
if (arc::ShouldArcAlwaysStart()) {
@@ -115,6 +114,13 @@ void ArcAppTest::SetUp(Profile* profile) {
app_instance_.get());
}
+void ArcAppTest::WaitForDefaultApps() {
+ DCHECK(arc_app_list_pref_);
+ base::RunLoop run_loop;
+ arc_app_list_pref_->SetDefaltAppsReadyCallback(run_loop.QuitClosure());
+ run_loop.Run();
+}
+
void ArcAppTest::CreateFakeAppsAndPackages() {
arc::mojom::AppInfo app;
// Make sure we have enough data for test.
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_test.h ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698