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

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

Issue 221873005: Some cleanup of WallpaperManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Compilation fixes. Created 6 years, 8 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/wallpaper_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc b/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
index ccce769d298a8cd57216781af054f53016851a2d..d4cd33bc2b5ec1945e3fdb1a2e592cb54ca4ea6f 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
@@ -164,6 +164,10 @@ class WallpaperManagerBrowserTest : public InProcessBrowserTest,
return WallpaperManager::Get()->loaded_wallpapers();
}
+ void ClearDisposableWallpaperCache() {
+ WallpaperManager::Get()->ClearDisposableWallpaperCache();
+ }
+
// Creates a test image of size 1x1.
gfx::ImageSkia CreateTestImage(int width, int height, SkColor color) {
SkBitmap bitmap;
@@ -405,7 +409,7 @@ IN_PROC_BROWSER_TEST_P(WallpaperManagerBrowserTest,
wallpaper_manager->SetUserWallpaperNow(kTestUser1);
WaitAsyncWallpaperLoadFinished();
EXPECT_EQ(1, LoadedWallpapers());
- wallpaper_manager->ClearDisposableWallpaperCache();
+ ClearDisposableWallpaperCache();
// Change wallpaper to a custom wallpaper.
std::string id = base::Int64ToString(base::Time::Now().ToInternalValue());
@@ -695,13 +699,12 @@ IN_PROC_BROWSER_TEST_P(WallpaperManagerBrowserTestCacheUpdate,
EXPECT_TRUE(cached_wallpaper.BackedBySameObjectAs(red_wallpaper));
gfx::ImageSkia green_wallpaper = CreateTestImage(SK_ColorGREEN);
- chromeos::UserImage image(green_wallpaper);
wallpaper_manager->SetCustomWallpaper(kTestUser1,
kTestUser1Hash,
"dummy", // dummy file name
WALLPAPER_LAYOUT_CENTER,
User::CUSTOMIZED,
- image,
+ green_wallpaper,
true);
WaitAsyncWallpaperLoadFinished();
// SetCustomWallpaper should also update wallpaper cache when multi-profile is
@@ -924,13 +927,12 @@ IN_PROC_BROWSER_TEST_P(WallpaperManagerBrowserTest,
// Custom wallpaper should be applied immediately, canceling the default
// wallpaper load task.
gfx::ImageSkia image = CreateTestImage(640, 480, kCustomWallpaperColor);
- UserImage wallpaper(image);
WallpaperManager::Get()->SetCustomWallpaper(UserManager::kStubUser,
"test_hash",
"test-nofile.jpeg",
WALLPAPER_LAYOUT_STRETCH,
User::CUSTOMIZED,
- wallpaper,
+ image,
true);
WaitAsyncWallpaperLoadFinished();

Powered by Google App Engine
This is Rietveld 408576698