| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 class WallpaperManagerBrowserTest : public InProcessBrowserTest { | 65 class WallpaperManagerBrowserTest : public InProcessBrowserTest { |
| 66 public: | 66 public: |
| 67 WallpaperManagerBrowserTest() : controller_(NULL), | 67 WallpaperManagerBrowserTest() : controller_(NULL), |
| 68 local_state_(NULL) { | 68 local_state_(NULL) { |
| 69 } | 69 } |
| 70 | 70 |
| 71 ~WallpaperManagerBrowserTest() override {} | 71 ~WallpaperManagerBrowserTest() override {} |
| 72 | 72 |
| 73 void SetUpOnMainThread() override { | 73 void SetUpOnMainThread() override { |
| 74 controller_ = ash::WmShell::Get()->wallpaper_controller(); | 74 controller_ = ash::Shell::GetInstance()->wallpaper_controller(); |
| 75 controller_->set_wallpaper_reload_delay_for_test(0); | 75 controller_->set_wallpaper_reload_delay_for_test(0); |
| 76 local_state_ = g_browser_process->local_state(); | 76 local_state_ = g_browser_process->local_state(); |
| 77 UpdateDisplay("800x600"); | 77 UpdateDisplay("800x600"); |
| 78 } | 78 } |
| 79 | 79 |
| 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 |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 | 825 |
| 826 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 826 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
| 827 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 827 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 828 | 828 |
| 829 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 829 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 830 controller_->GetWallpaper(), | 830 controller_->GetWallpaper(), |
| 831 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 831 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
| 832 } | 832 } |
| 833 | 833 |
| 834 } // namespace chromeos | 834 } // namespace chromeos |
| OLD | NEW |