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

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

Issue 330843002: Make the policy fetch for first time login blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes comments from Bartosz and a failing test Created 6 years, 5 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/policy/user_cloud_policy_manager_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..753a64bec5ade258a9972be8d2db7fbdc8d833a6 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());
@@ -543,12 +543,10 @@ TEST_F(LoginUtilsTest, NormalLoginDoesntBlock) {
// The profile will be created without waiting for a policy response.
PrepareProfile(kUsername);
- EXPECT_TRUE(prepared_profile_);
- ASSERT_TRUE(user_manager->IsUserLoggedIn());
- EXPECT_EQ(kUsername, user_manager->GetLoggedInUser()->email());
+ EXPECT_FALSE(prepared_profile_);
Nikita (slow) 2014/07/08 15:08:30 Why profile will be NULL here?
kaliamoorthi 2014/07/08 15:44:34 I have made the first login block on policy fetch
}
-TEST_F(LoginUtilsTest, EnterpriseLoginDoesntBlockForNormalUser) {
+TEST_F(LoginUtilsTest, EnterpriseLoginDoesBlockForNormalUser) {
UserManager* user_manager = UserManager::Get();
EXPECT_FALSE(user_manager->IsUserLoggedIn());
EXPECT_FALSE(connector_->IsEnterpriseManaged());
@@ -567,9 +565,7 @@ TEST_F(LoginUtilsTest, EnterpriseLoginDoesntBlockForNormalUser) {
// Login with a non-enterprise user shouldn't block.
PrepareProfile(kUsernameOtherDomain);
- EXPECT_TRUE(prepared_profile_);
- ASSERT_TRUE(user_manager->IsUserLoggedIn());
- EXPECT_EQ(kUsernameOtherDomain, user_manager->GetLoggedInUser()->email());
+ EXPECT_FALSE(prepared_profile_);
}
#if defined(ENABLE_RLZ)
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698