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 "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
| 9 #include "ash/common/wallpaper/wallpaper_controller.h" |
9 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
10 #include "ash/display/display_manager.h" | 11 #include "ash/display/display_manager.h" |
11 #include "ash/shell.h" | 12 #include "ash/shell.h" |
12 #include "ash/test/ash_test_base.h" | 13 #include "ash/test/ash_test_base.h" |
13 #include "ash/test/ash_test_helper.h" | 14 #include "ash/test/ash_test_helper.h" |
14 #include "ash/test/display_manager_test_api.h" | 15 #include "ash/test/display_manager_test_api.h" |
15 #include "ash/wallpaper/wallpaper_controller.h" | |
16 #include "ash/wallpaper/wallpaper_controller_observer.h" | |
17 #include "base/command_line.h" | 16 #include "base/command_line.h" |
18 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
19 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
20 #include "base/files/file_util.h" | 19 #include "base/files/file_util.h" |
21 #include "base/macros.h" | 20 #include "base/macros.h" |
22 #include "base/message_loop/message_loop.h" | 21 #include "base/message_loop/message_loop.h" |
23 #include "base/path_service.h" | 22 #include "base/path_service.h" |
24 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
25 #include "base/time/time.h" | 24 #include "base/time/time.h" |
26 #include "base/values.h" | 25 #include "base/values.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 64 |
66 class WallpaperManagerBrowserTest : public InProcessBrowserTest { | 65 class WallpaperManagerBrowserTest : public InProcessBrowserTest { |
67 public: | 66 public: |
68 WallpaperManagerBrowserTest() : controller_(NULL), | 67 WallpaperManagerBrowserTest() : controller_(NULL), |
69 local_state_(NULL) { | 68 local_state_(NULL) { |
70 } | 69 } |
71 | 70 |
72 ~WallpaperManagerBrowserTest() override {} | 71 ~WallpaperManagerBrowserTest() override {} |
73 | 72 |
74 void SetUpOnMainThread() override { | 73 void SetUpOnMainThread() override { |
75 controller_ = ash::Shell::GetInstance()->wallpaper_controller(); | 74 controller_ = ash::WmShell::Get()->wallpaper_controller(); |
76 controller_->set_wallpaper_reload_delay_for_test(0); | 75 controller_->set_wallpaper_reload_delay_for_test(0); |
77 local_state_ = g_browser_process->local_state(); | 76 local_state_ = g_browser_process->local_state(); |
78 UpdateDisplay("800x600"); | 77 UpdateDisplay("800x600"); |
79 } | 78 } |
80 | 79 |
81 void SetUpCommandLine(base::CommandLine* command_line) override { | 80 void SetUpCommandLine(base::CommandLine* command_line) override { |
82 command_line->AppendSwitch(switches::kLoginManager); | 81 command_line->AppendSwitch(switches::kLoginManager); |
83 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 82 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
84 } | 83 } |
85 | 84 |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 | 847 |
849 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 848 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
850 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 849 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
851 | 850 |
852 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 851 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
853 controller_->GetWallpaper(), | 852 controller_->GetWallpaper(), |
854 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 853 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
855 } | 854 } |
856 | 855 |
857 } // namespace chromeos | 856 } // namespace chromeos |
OLD | NEW |