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

Unified Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 10590004: [cros] Fake a stub user login when no --login-manager and --login-user are given. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Further test fixes. Created 8 years, 6 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/login/login_utils_browsertest.cc
diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc
index 6496708e87235623003c3390c2c93162f07f3335..3a24b7951e5e9d5e9861104a28ae42170ff7424b 100644
--- a/chrome/browser/chromeos/login/login_utils_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc
@@ -399,8 +399,7 @@ class LoginUtilsBlockingLoginTest
TEST_F(LoginUtilsTest, NormalLoginDoesntBlock) {
UserManager* user_manager = UserManager::Get();
- ASSERT_TRUE(!user_manager->IsUserLoggedIn() ||
- user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(!user_manager->IsUserLoggedIn());
EXPECT_FALSE(connector_->IsEnterpriseManaged());
EXPECT_FALSE(prepared_profile_);
@@ -408,23 +407,20 @@ TEST_F(LoginUtilsTest, NormalLoginDoesntBlock) {
PrepareProfile(kUsername);
EXPECT_TRUE(prepared_profile_);
- ASSERT_TRUE(user_manager->IsUserLoggedIn() &&
- !user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(user_manager->IsUserLoggedIn());
EXPECT_EQ(kUsername, user_manager->GetLoggedInUser().email());
}
TEST_F(LoginUtilsTest, EnterpriseLoginDoesntBlockForNormalUser) {
UserManager* user_manager = UserManager::Get();
- ASSERT_TRUE(!user_manager->IsUserLoggedIn() ||
- user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(!user_manager->IsUserLoggedIn());
EXPECT_FALSE(connector_->IsEnterpriseManaged());
EXPECT_FALSE(prepared_profile_);
// Enroll the device.
LockDevice(kUsername);
- ASSERT_TRUE(!user_manager->IsUserLoggedIn() ||
- user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(!user_manager->IsUserLoggedIn());
EXPECT_TRUE(connector_->IsEnterpriseManaged());
EXPECT_EQ(kDomain, connector_->GetEnterpriseDomain());
EXPECT_FALSE(prepared_profile_);
@@ -433,23 +429,20 @@ TEST_F(LoginUtilsTest, EnterpriseLoginDoesntBlockForNormalUser) {
PrepareProfile(kUsernameOtherDomain);
EXPECT_TRUE(prepared_profile_);
- ASSERT_TRUE(user_manager->IsUserLoggedIn() &&
- !user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(user_manager->IsUserLoggedIn());
EXPECT_EQ(kUsernameOtherDomain, user_manager->GetLoggedInUser().email());
}
TEST_P(LoginUtilsBlockingLoginTest, EnterpriseLoginBlocksForEnterpriseUser) {
UserManager* user_manager = UserManager::Get();
- ASSERT_TRUE(!user_manager->IsUserLoggedIn() ||
- user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(!user_manager->IsUserLoggedIn());
EXPECT_FALSE(connector_->IsEnterpriseManaged());
EXPECT_FALSE(prepared_profile_);
// Enroll the device.
LockDevice(kUsername);
- ASSERT_TRUE(!user_manager->IsUserLoggedIn() ||
- user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(!user_manager->IsUserLoggedIn());
EXPECT_TRUE(connector_->IsEnterpriseManaged());
EXPECT_EQ(kDomain, connector_->GetEnterpriseDomain());
EXPECT_FALSE(prepared_profile_);
@@ -458,8 +451,7 @@ TEST_P(LoginUtilsBlockingLoginTest, EnterpriseLoginBlocksForEnterpriseUser) {
PrepareProfile(kUsername);
EXPECT_FALSE(prepared_profile_);
- ASSERT_TRUE(user_manager->IsUserLoggedIn() &&
- !user_manager->IsLoggedInAsStub());
+ ASSERT_TRUE(user_manager->IsUserLoggedIn());
GaiaUrls* gaia_urls = GaiaUrls::GetInstance();
net::TestURLFetcher* fetcher;

Powered by Google App Engine
This is Rietveld 408576698