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)); | |
Andrew T Wilson (Slow)
2015/10/09 12:35:46
Why is it OK to remove this? Should we do a differ
peletskyi
2015/10/29 15:27:37
As far as I understood this line verifies domain,
| |
248 RunUntilIdle(); | 246 RunUntilIdle(); |
249 EXPECT_FALSE(user_manager->IsKnownUser(kUsername)); | 247 EXPECT_FALSE(user_manager->IsKnownUser(kUsername)); |
250 } | 248 } |
251 | 249 |
252 // Skip the OOBE, go to the sign-in screen, and wait for the login screen to | 250 // Skip the OOBE, go to the sign-in screen, and wait for the login screen to |
253 // become visible. | 251 // become visible. |
254 WaitForSigninScreen(); | 252 WaitForSigninScreen(); |
255 EXPECT_FALSE(profile_added_); | 253 EXPECT_FALSE(profile_added_); |
256 | 254 |
257 // Prepare the fake HTTP responses. | 255 // Prepare the fake HTTP responses. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 {3, kUsernameOtherDomain, true}, | 318 {3, kUsernameOtherDomain, true}, |
321 {4, kUsernameOtherDomain, true}, | 319 {4, kUsernameOtherDomain, true}, |
322 {5, kUsernameOtherDomain, true}, | 320 {5, kUsernameOtherDomain, true}, |
323 }; | 321 }; |
324 | 322 |
325 INSTANTIATE_TEST_CASE_P(BlockingLoginTestInstance, | 323 INSTANTIATE_TEST_CASE_P(BlockingLoginTestInstance, |
326 BlockingLoginTest, | 324 BlockingLoginTest, |
327 testing::ValuesIn(kBlockinLoginTestCases)); | 325 testing::ValuesIn(kBlockinLoginTestCases)); |
328 | 326 |
329 } // namespace chromeos | 327 } // namespace chromeos |
OLD | NEW |