Chromium Code Reviews| 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 4437e5352d412e8ee4a6aad21172b1f923bd4f9e..2898cb5327461aedc20cb81471d01fa984aa7d53 100644 |
| --- a/chrome/browser/chromeos/login/login_utils_browsertest.cc |
| +++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc |
| @@ -532,7 +532,7 @@ class LoginUtilsBlockingLoginTest |
| : public LoginUtilsTest, |
| public testing::WithParamInterface<int> {}; |
| -TEST_F(LoginUtilsTest, NormalLoginDoesntBlock) { |
| +TEST_F(LoginUtilsTest, NormalLoginDoesBlock) { |
| UserManager* user_manager = UserManager::Get(); |
| EXPECT_FALSE(user_manager->IsUserLoggedIn()); |
| EXPECT_FALSE(connector_->IsEnterpriseManaged()); |
| @@ -540,15 +540,14 @@ TEST_F(LoginUtilsTest, NormalLoginDoesntBlock) { |
| EXPECT_EQ(policy::USER_AFFILIATION_NONE, |
| connector_->GetUserAffiliation(kUsername)); |
| - // The profile will be created without waiting for a policy response. |
| + // First login in a unmanaged device would still block to verify if there is |
|
bartfab (slow)
2014/07/08 17:40:33
Nit: Use indicative, not subjunctive.
kaliamoorthi
2014/07/11 10:05:19
Removed the whole test
|
| + // a user cloud policy for the user. |
| PrepareProfile(kUsername); |
| - EXPECT_TRUE(prepared_profile_); |
| - ASSERT_TRUE(user_manager->IsUserLoggedIn()); |
| - EXPECT_EQ(kUsername, user_manager->GetLoggedInUser()->email()); |
| + EXPECT_FALSE(prepared_profile_); |
| } |
| -TEST_F(LoginUtilsTest, EnterpriseLoginDoesntBlockForNormalUser) { |
| +TEST_F(LoginUtilsTest, EnterpriseLoginDoesBlockForNormalUser) { |
| UserManager* user_manager = UserManager::Get(); |
| EXPECT_FALSE(user_manager->IsUserLoggedIn()); |
| EXPECT_FALSE(connector_->IsEnterpriseManaged()); |
| @@ -564,12 +563,11 @@ TEST_F(LoginUtilsTest, EnterpriseLoginDoesntBlockForNormalUser) { |
| EXPECT_EQ(policy::USER_AFFILIATION_NONE, |
| connector_->GetUserAffiliation(kUsernameOtherDomain)); |
| - // Login with a non-enterprise user shouldn't block. |
| + // First login with a non-enterprise user would still block to verify if |
| + // there is a user cloud policy for it. |
| PrepareProfile(kUsernameOtherDomain); |
|
bartfab (slow)
2014/07/08 17:40:33
This is not necessarily a non-enterprise user. The
kaliamoorthi
2014/07/11 10:05:19
Removed these and folded them into the existing pa
|
| - EXPECT_TRUE(prepared_profile_); |
| - ASSERT_TRUE(user_manager->IsUserLoggedIn()); |
| - EXPECT_EQ(kUsernameOtherDomain, user_manager->GetLoggedInUser()->email()); |
| + EXPECT_FALSE(prepared_profile_); |
| } |
| #if defined(ENABLE_RLZ) |