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

Unified Diff: chrome/browser/chromeos/arc/arc_session_manager_unittest.cc

Issue 2702723002: Extract kArcEnabled preference from ArcSessionManager part 1. (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/chromeos/arc/arc_session_manager_unittest.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc b/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
index a2ae503691852ed92025709486af532bfff0d805..a7fb1e304850c1dfbaceabe5d1a3b72a164e13fc 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
@@ -17,6 +17,7 @@
#include "base/run_loop.h"
#include "chrome/browser/chromeos/arc/arc_optin_uma.h"
#include "chrome/browser/chromeos/arc/arc_session_manager.h"
+#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/chromeos/arc/optin/arc_terms_of_service_oobe_negotiator.h"
#include "chrome/browser/chromeos/arc/test/arc_data_removed_waiter.h"
#include "chrome/browser/chromeos/login/screens/arc_terms_of_service_screen_actor.h"
@@ -376,20 +377,6 @@ TEST_F(ArcSessionManagerTest, CloseUIKeepsArcEnabled) {
arc_session_manager()->Shutdown();
}
-TEST_F(ArcSessionManagerTest, EnableDisablesArc) {
- const PrefService* pref = profile()->GetPrefs();
- arc_session_manager()->OnPrimaryUserProfilePrepared(profile());
-
- EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled));
- arc_session_manager()->SetArcPlayStoreEnabled(true);
- EXPECT_TRUE(pref->GetBoolean(prefs::kArcEnabled));
- arc_session_manager()->SetArcPlayStoreEnabled(false);
- EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled));
-
- // Correctly stop service.
- arc_session_manager()->Shutdown();
-}
-
TEST_F(ArcSessionManagerTest, SignInStatus) {
PrefService* const prefs = profile()->GetPrefs();
@@ -754,7 +741,7 @@ TEST_P(ArcSessionOobeOptInNegotiatorTest, OobeTermsAccepted) {
arc_session_manager()->state());
ReportResult(true);
EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state());
- EXPECT_TRUE(arc_session_manager()->IsArcPlayStoreEnabled());
+ EXPECT_TRUE(IsArcPlayStoreEnabledForProfile(profile()));
}
TEST_P(ArcSessionOobeOptInNegotiatorTest, OobeTermsRejected) {
@@ -764,8 +751,8 @@ TEST_P(ArcSessionOobeOptInNegotiatorTest, OobeTermsRejected) {
arc_session_manager()->state());
ReportResult(false);
EXPECT_EQ(ArcSessionManager::State::STOPPED, arc_session_manager()->state());
- EXPECT_FALSE(!IsManagedUser() &&
- arc_session_manager()->IsArcPlayStoreEnabled());
+ if (!IsManagedUser())
+ EXPECT_FALSE(IsArcPlayStoreEnabledForProfile(profile()));
}
TEST_P(ArcSessionOobeOptInNegotiatorTest, OobeTermsActorDestroyed) {
@@ -776,8 +763,8 @@ TEST_P(ArcSessionOobeOptInNegotiatorTest, OobeTermsActorDestroyed) {
CloseLoginDisplayHost();
ReportActorDestroyed();
EXPECT_EQ(ArcSessionManager::State::STOPPED, arc_session_manager()->state());
- EXPECT_FALSE(!IsManagedUser() &&
- arc_session_manager()->IsArcPlayStoreEnabled());
+ if (!IsManagedUser())
+ EXPECT_FALSE(IsArcPlayStoreEnabledForProfile(profile()));
}
} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698