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

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 fix. 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
« no previous file with comments | « chrome/browser/chromeos/login/wallpaper_manager.cc ('k') | chromeos/chromeos_switches.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3eb84dcca89350048e9d5acda5ca81a55be10092..e0af3e12288b966c54160c030ca9ed0404455236 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
@@ -163,6 +163,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;
@@ -404,7 +408,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());
@@ -692,13 +696,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
@@ -922,13 +925,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();
« no previous file with comments | « chrome/browser/chromeos/login/wallpaper_manager.cc ('k') | chromeos/chromeos_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698