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

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

Issue 239703014: Add debug to WallpaperManagerBrowserTest.DisplayChange test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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.cc
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index 12d945cd4d46460d85e9414bae02d08b63bb00d4..f40c1ec742a48d03114dbb25ecdfa71d137d3ae0 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -825,6 +825,26 @@ WallpaperManager::GetAppropriateResolution() {
: WALLPAPER_RESOLUTION_SMALL;
}
+WallpaperManager::WallpaperResolution
+WallpaperManager::GetAppropriateResolutionForTesting() {
+ gfx::Size size =
+ ash::DesktopBackgroundController::GetMaxDisplaySizeInNative();
+ const WallpaperResolution result = (size.width() > kSmallWallpaperMaxWidth ||
+ size.height() > kSmallWallpaperMaxHeight)
+ ? WALLPAPER_RESOLUTION_LARGE
+ : WALLPAPER_RESOLUTION_SMALL;
+
+ LOG(ERROR) << "WallpaperManager::GetAppropriateResolution(): width()="
+ << size.width()
+ << " vs kSmallWallpaperMaxWidth=" << kSmallWallpaperMaxWidth
+ << ", height()=" << size.height()
+ << " vs kSmallWallpaperMaxHeight=" << kSmallWallpaperMaxHeight
+ << ", result = " << (result == WALLPAPER_RESOLUTION_LARGE
+ ? "WALLPAPER_RESOLUTION_LARGE"
+ : "WALLPAPER_RESOLUTION_SMALL");
+ return result;
+}
+
void WallpaperManager::SetPolicyControlledWallpaper(
const std::string& user_id,
const UserImage& user_image) {
« no previous file with comments | « chrome/browser/chromeos/login/wallpaper_manager.h ('k') | chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698