| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 EXPECT_FALSE(profile_added_); | 236 EXPECT_FALSE(profile_added_); |
| 237 | 237 |
| 238 // Enroll the device, if enrollment is enabled for this test instance. | 238 // Enroll the device, if enrollment is enabled for this test instance. |
| 239 if (GetParam().enroll_device) { | 239 if (GetParam().enroll_device) { |
| 240 EnrollDevice(kUsername); | 240 EnrollDevice(kUsername); |
| 241 | 241 |
| 242 EXPECT_FALSE(user_manager->IsUserLoggedIn()); | 242 EXPECT_FALSE(user_manager->IsUserLoggedIn()); |
| 243 EXPECT_TRUE(browser_policy_connector()->IsEnterpriseManaged()); | 243 EXPECT_TRUE(browser_policy_connector()->IsEnterpriseManaged()); |
| 244 EXPECT_EQ(kDomain, browser_policy_connector()->GetEnterpriseDomain()); | 244 EXPECT_EQ(kDomain, browser_policy_connector()->GetEnterpriseDomain()); |
| 245 EXPECT_FALSE(profile_added_); | 245 EXPECT_FALSE(profile_added_); |
| 246 EXPECT_EQ(policy::USER_AFFILIATION_MANAGED, | |
| 247 browser_policy_connector()->GetUserAffiliation(kUsername)); | |
| 248 RunUntilIdle(); | 246 RunUntilIdle(); |
| 249 EXPECT_FALSE( | 247 EXPECT_FALSE( |
| 250 user_manager->IsKnownUser(AccountId::FromUserEmail(kUsername))); | 248 user_manager->IsKnownUser(AccountId::FromUserEmail(kUsername))); |
| 251 } | 249 } |
| 252 | 250 |
| 253 // Skip the OOBE, go to the sign-in screen, and wait for the login screen to | 251 // Skip the OOBE, go to the sign-in screen, and wait for the login screen to |
| 254 // become visible. | 252 // become visible. |
| 255 WaitForSigninScreen(); | 253 WaitForSigninScreen(); |
| 256 EXPECT_FALSE(profile_added_); | 254 EXPECT_FALSE(profile_added_); |
| 257 | 255 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 {3, kUsernameOtherDomain, true}, | 319 {3, kUsernameOtherDomain, true}, |
| 322 {4, kUsernameOtherDomain, true}, | 320 {4, kUsernameOtherDomain, true}, |
| 323 {5, kUsernameOtherDomain, true}, | 321 {5, kUsernameOtherDomain, true}, |
| 324 }; | 322 }; |
| 325 | 323 |
| 326 INSTANTIATE_TEST_CASE_P(BlockingLoginTestInstance, | 324 INSTANTIATE_TEST_CASE_P(BlockingLoginTestInstance, |
| 327 BlockingLoginTest, | 325 BlockingLoginTest, |
| 328 testing::ValuesIn(kBlockinLoginTestCases)); | 326 testing::ValuesIn(kBlockinLoginTestCases)); |
| 329 | 327 |
| 330 } // namespace chromeos | 328 } // namespace chromeos |
| OLD | NEW |