Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5789)

Unified Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc

Issue 2290473004: Rename ash desktop_background to wallpaper. (Closed)
Patch Set: Address comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
index f071014a05779faae289a85b527adbc2968e5f21..aea3f49b4105d2c184d6511e87897ab90af8037d 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
@@ -7,13 +7,13 @@
#include <stddef.h>
#include "ash/common/wm_shell.h"
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "ash/desktop_background/desktop_background_controller_observer.h"
#include "ash/display/display_manager.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/ash_test_helper.h"
#include "ash/test/display_manager_test_api.h"
+#include "ash/wallpaper/wallpaper_controller.h"
+#include "ash/wallpaper/wallpaper_controller_observer.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
@@ -72,7 +72,7 @@ class WallpaperManagerBrowserTest : public InProcessBrowserTest {
~WallpaperManagerBrowserTest() override {}
void SetUpOnMainThread() override {
- controller_ = ash::Shell::GetInstance()->desktop_background_controller();
+ controller_ = ash::Shell::GetInstance()->wallpaper_controller();
controller_->set_wallpaper_reload_delay_for_test(0);
local_state_ = g_browser_process->local_state();
UpdateDisplay("800x600");
@@ -160,7 +160,7 @@ class WallpaperManagerBrowserTest : public InProcessBrowserTest {
*wallpaper_dir_, &wallpaper_manager_command_line_);
}
- ash::DesktopBackgroundController* controller_;
+ ash::WallpaperController* controller_;
PrefService* local_state_;
std::unique_ptr<base::CommandLine> wallpaper_manager_command_line_;
@@ -545,7 +545,7 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestCacheUpdate,
WallpaperManager* wallpaper_manager = WallpaperManager::Get();
// Force load initial wallpaper
- // (simulate DesktopBackgroundController::UpdateDisplay()).
+ // (simulate WallpaperController::UpdateDisplay()).
wallpaper_manager->UpdateWallpaper(true);
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
std::unique_ptr<WallpaperManager::TestApi> test_api;
@@ -648,7 +648,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
// equal to kSmallWallpaperMaxWidth by kSmallWallpaperMaxHeight, even if
// multiple displays are connected.
UpdateDisplay("800x600");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_SMALL,
@@ -656,7 +655,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
EXPECT_EQ(0, observer.GetUpdateWallpaperCountAndReset());
UpdateDisplay("800x600,800x600");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_SMALL,
@@ -664,7 +662,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
EXPECT_EQ(0, observer.GetUpdateWallpaperCountAndReset());
UpdateDisplay("1366x800");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_SMALL,
@@ -673,7 +670,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
// At larger sizes, large wallpapers should be used.
UpdateDisplay("1367x800");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_LARGE,
@@ -681,7 +677,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
EXPECT_EQ(1, observer.GetUpdateWallpaperCountAndReset());
UpdateDisplay("1367x801");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_LARGE,
@@ -689,7 +684,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
EXPECT_EQ(1, observer.GetUpdateWallpaperCountAndReset());
UpdateDisplay("2560x1700");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_LARGE,
@@ -698,7 +692,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
// Rotated smaller screen may use larger image.
UpdateDisplay("800x600/r");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_SMALL,
@@ -706,14 +699,12 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
EXPECT_EQ(1, observer.GetUpdateWallpaperCountAndReset());
UpdateDisplay("800x600/r,800x600");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_SMALL,
WallpaperManager::Get()->GetAppropriateResolution());
EXPECT_EQ(1, observer.GetUpdateWallpaperCountAndReset());
UpdateDisplay("1366x800/r");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(WallpaperManager::WALLPAPER_RESOLUTION_LARGE,
@@ -722,7 +713,6 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
// Max display size didn't change.
UpdateDisplay("900x800/r,400x1366");
- // Wait for asynchronous DisplayBackgroundController::UpdateDisplay() call.
base::RunLoop().RunUntilIdle();
wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(0, observer.GetUpdateWallpaperCountAndReset());

Powered by Google App Engine
This is Rietveld 408576698