| 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.
|
|
|