| 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 | 787 |
| 788 WallpaperManager::Get()->SetDefaultWallpaperNow(std::string()); | 788 WallpaperManager::Get()->SetDefaultWallpaperNow(std::string()); |
| 789 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 789 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 790 | 790 |
| 791 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 791 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 792 controller_->GetWallpaper(), | 792 controller_->GetWallpaper(), |
| 793 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 793 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
| 794 } | 794 } |
| 795 | 795 |
| 796 } // namespace chromeos | 796 } // namespace chromeos |
| OLD | NEW |