OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 EXPECT_CALL(*cryptohome_, InstallAttributesGet(kAttributeOwned, _)) | 147 EXPECT_CALL(*cryptohome_, InstallAttributesGet(kAttributeOwned, _)) |
148 .WillRepeatedly(DoAll(SetArgPointee<1>(kTrue), | 148 .WillRepeatedly(DoAll(SetArgPointee<1>(kTrue), |
149 Return(true))); | 149 Return(true))); |
150 EXPECT_CALL(*cryptohome_, InstallAttributesGet(kAttributeOwner, _)) | 150 EXPECT_CALL(*cryptohome_, InstallAttributesGet(kAttributeOwner, _)) |
151 .WillRepeatedly(DoAll(SetArgPointee<1>(kUsername), | 151 .WillRepeatedly(DoAll(SetArgPointee<1>(kUsername), |
152 Return(true))); | 152 Return(true))); |
153 test_api->SetCryptohomeLibrary(cryptohome_, true); | 153 test_api->SetCryptohomeLibrary(cryptohome_, true); |
154 | 154 |
155 browser_process_->SetProfileManager( | 155 browser_process_->SetProfileManager( |
156 new ProfileManagerWithoutInit(scoped_temp_dir_.path())); | 156 new ProfileManagerWithoutInit(scoped_temp_dir_.path())); |
157 connector_ = policy::BrowserPolicyConnector::Create(); | 157 connector_ = browser_process_->browser_policy_connector(); |
158 browser_process_->SetBrowserPolicyConnector(connector_); | 158 connector_->Init(); |
159 | 159 |
160 loop_.RunAllPending(); | 160 loop_.RunAllPending(); |
161 } | 161 } |
162 | 162 |
163 virtual void TearDown() OVERRIDE { | 163 virtual void TearDown() OVERRIDE { |
164 loop_.RunAllPending(); | 164 loop_.RunAllPending(); |
165 { | 165 { |
166 // chrome_browser_net::Predictor usually skips its shutdown routines on | 166 // chrome_browser_net::Predictor usually skips its shutdown routines on |
167 // unit_tests, but does the full thing when | 167 // unit_tests, but does the full thing when |
168 // g_browser_process->profile_manager() is valid during initialization. | 168 // g_browser_process->profile_manager() is valid during initialization. |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 } | 448 } |
449 | 449 |
450 INSTANTIATE_TEST_CASE_P( | 450 INSTANTIATE_TEST_CASE_P( |
451 LoginUtilsBlockingLoginTestInstance, | 451 LoginUtilsBlockingLoginTestInstance, |
452 LoginUtilsBlockingLoginTest, | 452 LoginUtilsBlockingLoginTest, |
453 testing::Values(0, 1, 2, 3, 4, 5)); | 453 testing::Values(0, 1, 2, 3, 4, 5)); |
454 | 454 |
455 } // namespace | 455 } // namespace |
456 | 456 |
457 } | 457 } |
OLD | NEW |