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/wallpaper/wallpaper_controller.h" |
10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void SetUpCommandLine(base::CommandLine* command_line) override { | 80 void SetUpCommandLine(base::CommandLine* command_line) override { |
81 command_line->AppendSwitch(switches::kLoginManager); | 81 command_line->AppendSwitch(switches::kLoginManager); |
82 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 82 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
83 } | 83 } |
84 | 84 |
85 void TearDownOnMainThread() override { controller_ = NULL; } | 85 void TearDownOnMainThread() override { controller_ = NULL; } |
86 | 86 |
87 // Update the display configuration as given in |display_specs|. See | 87 // Update the display configuration as given in |display_specs|. See |
88 // ash::test::DisplayManagerTestApi::UpdateDisplay for more details. | 88 // ash::test::DisplayManagerTestApi::UpdateDisplay for more details. |
89 void UpdateDisplay(const std::string& display_specs) { | 89 void UpdateDisplay(const std::string& display_specs) { |
90 ash::test::DisplayManagerTestApi().UpdateDisplay(display_specs); | 90 ash::test::DisplayManagerTestApi( |
| 91 ash::Shell::GetInstance()->display_manager()) |
| 92 .UpdateDisplay(display_specs); |
91 } | 93 } |
92 | 94 |
93 void WaitAsyncWallpaperLoadStarted() { | 95 void WaitAsyncWallpaperLoadStarted() { |
94 base::RunLoop().RunUntilIdle(); | 96 base::RunLoop().RunUntilIdle(); |
95 } | 97 } |
96 | 98 |
97 protected: | 99 protected: |
98 | 100 |
99 // Return custom wallpaper path. Create directory if not exist. | 101 // Return custom wallpaper path. Create directory if not exist. |
100 base::FilePath GetCustomWallpaperPath( | 102 base::FilePath GetCustomWallpaperPath( |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 | 845 |
844 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 846 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
845 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 847 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
846 | 848 |
847 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 849 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
848 controller_->GetWallpaper(), | 850 controller_->GetWallpaper(), |
849 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 851 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
850 } | 852 } |
851 | 853 |
852 } // namespace chromeos | 854 } // namespace chromeos |
OLD | NEW |