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