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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2702723002: Extract kArcEnabled preference from ArcSessionManager part 1. (Closed)
Patch Set: Address comments. 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/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
index ac40fa9c3d67e2d73d8c1a1fe96f10174400d7c9..8e58f1f925cd3ba64d6dffc8d225919c3748c397 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
@@ -41,6 +41,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/chromeos/arc/arc_support_host.h"
+#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
#include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
@@ -824,7 +825,7 @@ class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest {
}
void EnableArc(bool enabled) {
- arc_test_.arc_session_manager()->SetArcPlayStoreEnabled(enabled);
+ arc::SetArcPlayStoreEnabledForProfile(profile(), enabled);
base::RunLoop().RunUntilIdle();
}
@@ -838,9 +839,9 @@ class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest {
bool arc_managed,
arc::ArcSessionManager::State state,
const std::string& pin_status) {
- EXPECT_EQ(arc_enabled,
- arc_test_.arc_session_manager()->IsArcPlayStoreEnabled());
- EXPECT_EQ(arc_managed, arc_test_.arc_session_manager()->IsArcManaged());
+ EXPECT_EQ(arc_enabled, arc::IsArcPlayStoreEnabledForProfile(profile()));
+ EXPECT_EQ(arc_managed,
+ arc::IsArcPlayStoreEnabledPreferenceManagedForProfile(profile()));
EXPECT_EQ(state, arc_test_.arc_session_manager()->state());
EXPECT_EQ(pin_status, GetPinnedAppStatus());
}
@@ -3951,7 +3952,7 @@ TEST_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs();
EnableArc(false);
- EXPECT_FALSE(arc_test_.arc_session_manager()->IsArcPlayStoreEnabled());
+ EXPECT_FALSE(arc::IsArcPlayStoreEnabledForProfile(profile()));
ASSERT_TRUE(prefs->GetAppIds().size());
const std::string app_id =
@@ -3959,7 +3960,7 @@ TEST_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
EXPECT_EQ(ash::kInvalidShelfID,
launcher_controller_->GetShelfIDForAppID(app_id));
EXPECT_TRUE(arc::LaunchApp(profile(), app_id, ui::EF_LEFT_MOUSE_BUTTON));
- EXPECT_TRUE(arc_test_.arc_session_manager()->IsArcPlayStoreEnabled());
+ EXPECT_TRUE(arc::IsArcPlayStoreEnabledForProfile(profile()));
EXPECT_NE(ash::kInvalidShelfID,
launcher_controller_->GetShelfIDForAppID(app_id));
@@ -3969,7 +3970,7 @@ TEST_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
launcher_controller_->GetShelfIDForAppID(app_id));
EXPECT_TRUE(arc::LaunchApp(profile(), app_id, ui::EF_LEFT_MOUSE_BUTTON));
- EXPECT_TRUE(arc_test_.arc_session_manager()->IsArcPlayStoreEnabled());
+ EXPECT_TRUE(arc::IsArcPlayStoreEnabledForProfile(profile()));
EXPECT_NE(ash::kInvalidShelfID,
launcher_controller_->GetShelfIDForAppID(app_id));

Powered by Google App Engine
This is Rietveld 408576698