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 | 7 |
8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
9 #include "ash/desktop_background/desktop_background_controller_observer.h" | 9 #include "ash/desktop_background/desktop_background_controller_observer.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "ash/test/ash_test_base.h" | 11 #include "ash/test/ash_test_base.h" |
12 #include "ash/test/display_manager_test_api.h" | 12 #include "ash/test/display_manager_test_api.h" |
13 #include "ash/test/test_user_wallpaper_delegate.h" | 13 #include "ash/test/test_user_wallpaper_delegate.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
17 #include "base/files/scoped_temp_dir.h" | 17 #include "base/files/scoped_temp_dir.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/prefs/pref_service.h" | |
20 #include "base/prefs/testing_pref_service.h" | |
21 #include "chrome/browser/chromeos/login/startup_utils.h" | 19 #include "chrome/browser/chromeos/login/startup_utils.h" |
22 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" | 20 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
23 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 21 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
24 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 22 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
25 #include "chrome/browser/chromeos/settings/cros_settings.h" | 23 #include "chrome/browser/chromeos/settings/cros_settings.h" |
26 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 24 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
27 #include "chrome/browser/prefs/browser_prefs.h" | 25 #include "chrome/browser/prefs/browser_prefs.h" |
28 #include "chrome/test/base/testing_browser_process.h" | 26 #include "chrome/test/base/testing_browser_process.h" |
29 #include "chromeos/chromeos_switches.h" | 27 #include "chromeos/chromeos_switches.h" |
30 #include "chromeos/settings/cros_settings_names.h" | 28 #include "chromeos/settings/cros_settings_names.h" |
31 #include "chromeos/settings/cros_settings_provider.h" | 29 #include "chromeos/settings/cros_settings_provider.h" |
| 30 #include "components/prefs/pref_service.h" |
| 31 #include "components/prefs/testing_pref_service.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 #include "ui/gfx/image/image.h" | 33 #include "ui/gfx/image/image.h" |
34 | 34 |
35 using namespace ash; | 35 using namespace ash; |
36 | 36 |
37 namespace chromeos { | 37 namespace chromeos { |
38 | 38 |
39 class WallpaperManagerCacheTest : public test::AshTestBase { | 39 class WallpaperManagerCacheTest : public test::AshTestBase { |
40 public: | 40 public: |
41 WallpaperManagerCacheTest() | 41 WallpaperManagerCacheTest() |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 fake_user_manager()->RemoveUserFromList(test_account_id_2); | 151 fake_user_manager()->RemoveUserFromList(test_account_id_2); |
152 | 152 |
153 // Test that only user1's wallpaper can be found in cache. | 153 // Test that only user1's wallpaper can be found in cache. |
154 EXPECT_TRUE( | 154 EXPECT_TRUE( |
155 test_api->GetWallpaperFromCache(test_account_id_1, &cached_wallpaper)); | 155 test_api->GetWallpaperFromCache(test_account_id_1, &cached_wallpaper)); |
156 EXPECT_FALSE( | 156 EXPECT_FALSE( |
157 test_api->GetWallpaperFromCache(test_account_id_2, &cached_wallpaper)); | 157 test_api->GetWallpaperFromCache(test_account_id_2, &cached_wallpaper)); |
158 } | 158 } |
159 | 159 |
160 } // namespace chromeos | 160 } // namespace chromeos |
OLD | NEW |