| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 base::Bind(&CopyLockResult, &loop, &result)); | 402 base::Bind(&CopyLockResult, &loop, &result)); |
| 403 loop.Run(); | 403 loop.Run(); |
| 404 EXPECT_EQ(policy::EnterpriseInstallAttributes::LOCK_SUCCESS, result); | 404 EXPECT_EQ(policy::EnterpriseInstallAttributes::LOCK_SUCCESS, result); |
| 405 RunUntilIdle(); | 405 RunUntilIdle(); |
| 406 } | 406 } |
| 407 | 407 |
| 408 void PrepareProfile(const std::string& username) { | 408 void PrepareProfile(const std::string& username) { |
| 409 // Normally this would happen during browser startup, but for tests | 409 // Normally this would happen during browser startup, but for tests |
| 410 // we need to trigger creation of Profile-related services. | 410 // we need to trigger creation of Profile-related services. |
| 411 ChromeBrowserMainExtraPartsProfiles:: | 411 ChromeBrowserMainExtraPartsProfiles:: |
| 412 EnsureProfileKeyedServiceFactoriesBuilt(); | 412 EnsureBrowserContextKeyedServiceFactoriesBuilt(); |
| 413 | 413 |
| 414 DeviceSettingsTestHelper device_settings_test_helper; | 414 DeviceSettingsTestHelper device_settings_test_helper; |
| 415 DeviceSettingsService::Get()->SetSessionManager( | 415 DeviceSettingsService::Get()->SetSessionManager( |
| 416 &device_settings_test_helper, new MockOwnerKeyUtil()); | 416 &device_settings_test_helper, new MockOwnerKeyUtil()); |
| 417 | 417 |
| 418 EXPECT_CALL(*cryptohome_, GetSystemSalt()) | 418 EXPECT_CALL(*cryptohome_, GetSystemSalt()) |
| 419 .WillRepeatedly(Return(std::string("stub_system_salt"))); | 419 .WillRepeatedly(Return(std::string("stub_system_salt"))); |
| 420 EXPECT_CALL(*mock_async_method_caller_, AsyncMount(_, _, _, _)) | 420 EXPECT_CALL(*mock_async_method_caller_, AsyncMount(_, _, _, _)) |
| 421 .WillRepeatedly(Return()); | 421 .WillRepeatedly(Return()); |
| 422 EXPECT_CALL(*mock_async_method_caller_, AsyncGetSanitizedUsername(_, _)) | 422 EXPECT_CALL(*mock_async_method_caller_, AsyncGetSanitizedUsername(_, _)) |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 } | 717 } |
| 718 | 718 |
| 719 INSTANTIATE_TEST_CASE_P( | 719 INSTANTIATE_TEST_CASE_P( |
| 720 LoginUtilsBlockingLoginTestInstance, | 720 LoginUtilsBlockingLoginTestInstance, |
| 721 LoginUtilsBlockingLoginTest, | 721 LoginUtilsBlockingLoginTest, |
| 722 testing::Values(0, 1, 2, 3, 4, 5)); | 722 testing::Values(0, 1, 2, 3, 4, 5)); |
| 723 | 723 |
| 724 } // namespace | 724 } // namespace |
| 725 | 725 |
| 726 } | 726 } |
| OLD | NEW |