summaryrefslogtreecommitdiffstats
path: root/ash/test
diff options
context:
space:
mode:
authoralemate@chromium.org <alemate@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 23:53:07 +0000
committeralemate@chromium.org <alemate@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 23:53:07 +0000
commit3f4c26ecd470540a43b9d422408aad64e3fedf96 (patch)
treee504b8820bffcc2a4d103bfdb6030666e0f00b5c /ash/test
parent19db94feaaa7e875d09ac8022e88aee455b88887 (diff)
downloadchromium_src-3f4c26ecd470540a43b9d422408aad64e3fedf96.zip
chromium_src-3f4c26ecd470540a43b9d422408aad64e3fedf96.tar.gz
chromium_src-3f4c26ecd470540a43b9d422408aad64e3fedf96.tar.bz2
Move all wallpaper file loading and decoding from DesktopBackgroundController to WallpaperManager.
To simplify DesktopBackgroundController and allow customized default wallpapers, we need to move all "default" wallpaper loading to WallpaperManager. BUG=348136 TEST=unittests Review URL: https://codereview.chromium.org/215293003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r--ash/test/ash_test_base.cc14
-rw-r--r--ash/test/ash_test_base.h6
-rw-r--r--ash/test/ash_test_helper.cc22
-rw-r--r--ash/test/ash_test_helper.h8
-rw-r--r--ash/test/test_user_wallpaper_delegate.cc2
5 files changed, 35 insertions, 17 deletions
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 21bbbd7..49f1d08 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -207,22 +207,12 @@ aura::test::EventGenerator& AshTestBase::GetEventGenerator() {
return *event_generator_.get();
}
-// static
bool AshTestBase::SupportsMultipleDisplays() {
-#if defined(OS_WIN)
- return base::win::GetVersion() < base::win::VERSION_WIN8;
-#else
- return true;
-#endif
+ return AshTestHelper::SupportsMultipleDisplays();
}
-// static
bool AshTestBase::SupportsHostWindowResize() {
-#if defined(OS_WIN)
- return base::win::GetVersion() < base::win::VERSION_WIN8;
-#else
- return true;
-#endif
+ return AshTestHelper::SupportsHostWindowResize();
}
void AshTestBase::UpdateDisplay(const std::string& display_specs) {
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h
index 193e71a..4ac828e 100644
--- a/ash/test/ash_test_base.h
+++ b/ash/test/ash_test_base.h
@@ -102,12 +102,10 @@ class AshTestBase : public testing::Test {
NUMBER_OF_BLOCK_REASONS
};
- // True if the running environment supports multiple displays,
- // or false otherwise (e.g. win8 bot).
+ // Proxy to AshTestHelper::SupportsMultipleDisplays().
static bool SupportsMultipleDisplays();
- // True if the running environment supports host window resize,
- // or false otherwise (e.g. win8 bot).
+ // Proxy to AshTestHelper::SupportsHostWindowResize().
static bool SupportsHostWindowResize();
void set_start_session(bool start_session) { start_session_ = start_session; }
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index f66c6ce..75034c5 100644
--- a/ash/test/ash_test_helper.cc
+++ b/ash/test/ash_test_helper.cc
@@ -30,6 +30,10 @@
#include "ui/keyboard/keyboard.h"
#endif
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
#if defined(USE_X11)
#include "ui/aura/window_tree_host_x11.h"
#endif
@@ -147,5 +151,23 @@ aura::Window* AshTestHelper::CurrentContext() {
return root_window;
}
+// static
+bool AshTestHelper::SupportsMultipleDisplays() {
+#if defined(OS_WIN)
+ return base::win::GetVersion() < base::win::VERSION_WIN8;
+#else
+ return true;
+#endif
+}
+
+// static
+bool AshTestHelper::SupportsHostWindowResize() {
+#if defined(OS_WIN)
+ return base::win::GetVersion() < base::win::VERSION_WIN8;
+#else
+ return true;
+#endif
+}
+
} // namespace test
} // namespace ash
diff --git a/ash/test/ash_test_helper.h b/ash/test/ash_test_helper.h
index 39ab10d..6fb266f 100644
--- a/ash/test/ash_test_helper.h
+++ b/ash/test/ash_test_helper.h
@@ -61,6 +61,14 @@ class AshTestHelper {
return test_screenshot_delegate_;
}
+ // True if the running environment supports multiple displays,
+ // or false otherwise (e.g. win8 bot).
+ static bool SupportsMultipleDisplays();
+
+ // True if the running environment supports host window resize,
+ // or false otherwise (e.g. win8 bot).
+ static bool SupportsHostWindowResize();
+
private:
base::MessageLoopForUI* message_loop_; // Not owned.
TestShellDelegate* test_shell_delegate_; // Owned by ash::Shell.
diff --git a/ash/test/test_user_wallpaper_delegate.cc b/ash/test/test_user_wallpaper_delegate.cc
index 24ab287e..050f635 100644
--- a/ash/test/test_user_wallpaper_delegate.cc
+++ b/ash/test/test_user_wallpaper_delegate.cc
@@ -18,7 +18,7 @@ TestUserWallpaperDelegate::~TestUserWallpaperDelegate() {}
void TestUserWallpaperDelegate::UpdateWallpaper(bool clear_cache) {
DefaultUserWallpaperDelegate::UpdateWallpaper(clear_cache);
if (!custom_wallpaper_.isNull()) {
- Shell::GetInstance()->desktop_background_controller()->SetCustomWallpaper(
+ Shell::GetInstance()->desktop_background_controller()->SetWallpaperImage(
custom_wallpaper_, WALLPAPER_LAYOUT_STRETCH);
}
update_wallpaper_count_++;