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 <cstdlib> | 5 #include <cstdlib> |
6 #include <cstring> | 6 #include <cstring> |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Populate the stub DeviceSettingsProvider with valid values. | 65 // Populate the stub DeviceSettingsProvider with valid values. |
66 SetDeviceSettings(false, "", false); | 66 SetDeviceSettings(false, "", false); |
67 | 67 |
68 // Register an in-memory local settings instance. | 68 // Register an in-memory local settings instance. |
69 local_state_.reset( | 69 local_state_.reset( |
70 new ScopedTestingLocalState(TestingBrowserProcess::GetGlobal())); | 70 new ScopedTestingLocalState(TestingBrowserProcess::GetGlobal())); |
71 | 71 |
72 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 72 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
73 TestingBrowserProcess::GetGlobal()->SetProfileManager( | 73 TestingBrowserProcess::GetGlobal()->SetProfileManager( |
74 new UnittestProfileManager(temp_dir_.path())); | 74 new UnittestProfileManager(temp_dir_.GetPath())); |
75 | 75 |
76 chromeos::DBusThreadManager::Initialize(); | 76 chromeos::DBusThreadManager::Initialize(); |
77 | 77 |
78 ResetUserManager(); | 78 ResetUserManager(); |
79 WallpaperManager::Initialize(); | 79 WallpaperManager::Initialize(); |
80 } | 80 } |
81 | 81 |
82 void TearDown() override { | 82 void TearDown() override { |
83 // Unregister the in-memory local settings instance. | 83 // Unregister the in-memory local settings instance. |
84 local_state_.reset(); | 84 local_state_.reset(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 // The user is not allowed to lock the screen. | 235 // The user is not allowed to lock the screen. |
236 profile->GetPrefs()->SetBoolean(prefs::kAllowScreenLock, false); | 236 profile->GetPrefs()->SetBoolean(prefs::kAllowScreenLock, false); |
237 EXPECT_FALSE(user_manager::UserManager::Get()->CanCurrentUserLock()); | 237 EXPECT_FALSE(user_manager::UserManager::Get()->CanCurrentUserLock()); |
238 EXPECT_EQ(0U, user_manager::UserManager::Get()->GetUnlockUsers().size()); | 238 EXPECT_EQ(0U, user_manager::UserManager::Get()->GetUnlockUsers().size()); |
239 | 239 |
240 ResetUserManager(); | 240 ResetUserManager(); |
241 } | 241 } |
242 | 242 |
243 } // namespace chromeos | 243 } // namespace chromeos |
OLD | NEW |