Implement listing tests to a JSON file for iOS gtest test launcher
[chromium-blink-merge.git] / ash / test / test_user_wallpaper_delegate.cc
blob050f635c7c54e809617fa7482e599e5a1dcb329b
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/test/test_user_wallpaper_delegate.h"
7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/shell.h"
10 namespace ash {
11 namespace test {
13 TestUserWallpaperDelegate::TestUserWallpaperDelegate()
14 : update_wallpaper_count_(0) {}
16 TestUserWallpaperDelegate::~TestUserWallpaperDelegate() {}
18 void TestUserWallpaperDelegate::UpdateWallpaper(bool clear_cache) {
19 DefaultUserWallpaperDelegate::UpdateWallpaper(clear_cache);
20 if (!custom_wallpaper_.isNull()) {
21 Shell::GetInstance()->desktop_background_controller()->SetWallpaperImage(
22 custom_wallpaper_, WALLPAPER_LAYOUT_STRETCH);
24 update_wallpaper_count_++;
27 int TestUserWallpaperDelegate::GetUpdateWallpaperCountAndReset() {
28 int count = update_wallpaper_count_;
29 update_wallpaper_count_ = 0;
30 return count;
33 } // namespace test
34 } // namespace ash