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

Unified Diff: chrome/browser/sync/test/integration/sync_arc_package_helper.cc

Issue 2711033002: Fix Arc integration test. (Closed)
Patch Set: Created 3 years, 10 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
Index: chrome/browser/sync/test/integration/sync_arc_package_helper.cc
diff --git a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
index 8513e7be662dfbd0f215f5ecd80e229b37cf8232..76d75f37a95e601a34a45dcccb6f195ba987c8e6 100644
--- a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
-#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h"
#include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h"
#include "chromeos/chromeos_switches.h"
#include "components/arc/arc_bridge_service.h"
@@ -69,7 +68,8 @@ void SyncArcPackageHelper::SetupTest(SyncTest* test) {
user_manager_enabler_ = base::MakeUnique<chromeos::ScopedUserManagerEnabler>(
new chromeos::FakeChromeUserManager());
- ArcAppListPrefsFactory::SetFactoryForSyncTest();
+ InstanceHolder<mojom::AppInstance>::SetInstanceHolderForSyncTest();
+ ArcSessionManager::SetSessionManagerForSyncTest();
size_t id = 0;
for (auto* profile : test_->GetAllProfiles())
SetupArcService(profile, id++);
@@ -79,6 +79,7 @@ void SyncArcPackageHelper::SetupTest(SyncTest* test) {
void SyncArcPackageHelper::CleanUp() {
ArcSessionManager::Get()->Shutdown();
user_manager_enabler_.reset();
+ chromeos::ProfileHelper::Get()->ClearUserToProfileMappingForTesting();
}
void SyncArcPackageHelper::InstallPackageWithIndex(Profile* profile,
@@ -157,7 +158,6 @@ void SyncArcPackageHelper::SetupArcService(Profile* profile, size_t id) {
ArcAppListPrefs* arc_app_list_prefs = ArcAppListPrefs::Get(profile);
DCHECK(arc_app_list_prefs);
-
base::RunLoop run_loop;
arc_app_list_prefs->SetDefaltAppsReadyCallback(run_loop.QuitClosure());
run_loop.Run();

Powered by Google App Engine
This is Rietveld 408576698