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

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

Issue 2710273002: Split DisabledForEphemeralDataUsers tests into ChromeArcUtilTest. (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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c85489c14441ad18e85ebf1e28a2fc54d4ee955b..ab2acaede4f018374479e119ff663c06d19a3520 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
@@ -244,51 +244,6 @@ TEST_F(ArcSessionManagerTest, PrefChangeTriggersService) {
arc_session_manager()->Shutdown();
}
-TEST_F(ArcSessionManagerTest, DisabledForEphemeralDataUsers) {
- PrefService* const prefs = profile()->GetPrefs();
- EXPECT_FALSE(prefs->GetBoolean(prefs::kArcSignedIn));
- prefs->SetBoolean(prefs::kArcEnabled, true);
-
- chromeos::FakeChromeUserManager* const fake_user_manager =
- GetFakeUserManager();
-
- fake_user_manager->AddUser(fake_user_manager->GetGuestAccountId());
- fake_user_manager->SwitchActiveUser(fake_user_manager->GetGuestAccountId());
- arc_session_manager()->OnPrimaryUserProfilePrepared(profile());
- ASSERT_EQ(ArcSessionManager::State::NOT_INITIALIZED,
- arc_session_manager()->state());
-
- fake_user_manager->AddUser(user_manager::DemoAccountId());
- fake_user_manager->SwitchActiveUser(user_manager::DemoAccountId());
- arc_session_manager()->Shutdown();
- arc_session_manager()->OnPrimaryUserProfilePrepared(profile());
- ASSERT_EQ(ArcSessionManager::State::NOT_INITIALIZED,
- arc_session_manager()->state());
-
- const AccountId public_account_id(
- AccountId::FromUserEmail("public_user@gmail.com"));
- fake_user_manager->AddPublicAccountUser(public_account_id);
- fake_user_manager->SwitchActiveUser(public_account_id);
- arc_session_manager()->Shutdown();
- arc_session_manager()->OnPrimaryUserProfilePrepared(profile());
- ASSERT_EQ(ArcSessionManager::State::NOT_INITIALIZED,
- arc_session_manager()->state());
-
- const AccountId not_in_list_account_id(
hidehiko 2017/02/23 19:05:54 Note: this case is redundant, because this is cove
- AccountId::FromUserEmail("not_in_list_user@gmail.com"));
- fake_user_manager->set_ephemeral_users_enabled(true);
- fake_user_manager->AddUser(not_in_list_account_id);
- fake_user_manager->SwitchActiveUser(not_in_list_account_id);
- fake_user_manager->RemoveUserFromList(not_in_list_account_id);
- arc_session_manager()->Shutdown();
- arc_session_manager()->OnPrimaryUserProfilePrepared(profile());
- ASSERT_EQ(ArcSessionManager::State::NOT_INITIALIZED,
- arc_session_manager()->state());
-
- // Correctly stop service.
- arc_session_manager()->Shutdown();
-}
-
TEST_F(ArcSessionManagerTest, BaseWorkflow) {
ASSERT_TRUE(arc_session_manager()->IsSessionStopped());
ASSERT_EQ(ArcSessionManager::State::NOT_INITIALIZED,
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698