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 "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/desktop_background/desktop_background_controller_observer.h" | 8 #include "ash/desktop_background/desktop_background_controller_observer.h" |
9 #include "ash/desktop_background/desktop_background_controller_test_api.h" | 9 #include "ash/desktop_background/desktop_background_controller_test_api.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 DesktopBackgroundController::TestAPI(controller_) | 70 DesktopBackgroundController::TestAPI(controller_) |
71 .set_wallpaper_reload_delay_for_test(0); | 71 .set_wallpaper_reload_delay_for_test(0); |
72 UpdateDisplay("800x600"); | 72 UpdateDisplay("800x600"); |
73 } | 73 } |
74 | 74 |
75 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 75 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
76 command_line->AppendSwitch(switches::kLoginManager); | 76 command_line->AppendSwitch(switches::kLoginManager); |
77 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 77 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
78 } | 78 } |
79 | 79 |
80 virtual void CleanUpOnMainThread() OVERRIDE { | 80 virtual void TearDownOnMainThread() OVERRIDE { |
81 controller_ = NULL; | 81 controller_ = NULL; |
82 } | 82 } |
83 | 83 |
84 // Update the display configuration as given in |display_specs|. See | 84 // Update the display configuration as given in |display_specs|. See |
85 // ash::test::DisplayManagerTestApi::UpdateDisplay for more details. | 85 // ash::test::DisplayManagerTestApi::UpdateDisplay for more details. |
86 void UpdateDisplay(const std::string& display_specs) { | 86 void UpdateDisplay(const std::string& display_specs) { |
87 ash::test::DisplayManagerTestApi display_manager_test_api( | 87 ash::test::DisplayManagerTestApi display_manager_test_api( |
88 ash::Shell::GetInstance()->display_manager()); | 88 ash::Shell::GetInstance()->display_manager()); |
89 display_manager_test_api.UpdateDisplay(display_specs); | 89 display_manager_test_api.UpdateDisplay(display_specs); |
90 } | 90 } |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 | 802 |
803 WallpaperManager::Get()->SetDefaultWallpaperNow(std::string()); | 803 WallpaperManager::Get()->SetDefaultWallpaperNow(std::string()); |
804 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 804 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
805 | 805 |
806 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 806 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
807 controller_->GetWallpaper(), | 807 controller_->GetWallpaper(), |
808 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 808 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
809 } | 809 } |
810 | 810 |
811 } // namespace chromeos | 811 } // namespace chromeos |
OLD | NEW |