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

Side by Side Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc

Issue 2370913002: Removes AshTestBase::SupportsHostWindowResize (Closed)
Patch Set: missed Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/common/wallpaper/wallpaper_controller.h" 9 #include "ash/common/wallpaper/wallpaper_controller.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 } 624 }
625 625
626 private: 626 private:
627 int update_wallpaper_count_; 627 int update_wallpaper_count_;
628 WallpaperManager* wallpaper_manager_; 628 WallpaperManager* wallpaper_manager_;
629 629
630 DISALLOW_COPY_AND_ASSIGN(TestObserver); 630 DISALLOW_COPY_AND_ASSIGN(TestObserver);
631 }; 631 };
632 632
633 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) { 633 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DisplayChange) {
634 // TODO(derat|oshima|bshe): Host windows can't be resized on Win8.
635 if (!ash::test::AshTestHelper::SupportsHostWindowResize())
636 return;
637
638 TestObserver observer(WallpaperManager::Get()); 634 TestObserver observer(WallpaperManager::Get());
639 635
640 // Set the wallpaper to ensure that UpdateWallpaper() will be called when the 636 // Set the wallpaper to ensure that UpdateWallpaper() will be called when the
641 // display configuration changes. 637 // display configuration changes.
642 gfx::ImageSkia image = wallpaper_manager_test_utils::CreateTestImage( 638 gfx::ImageSkia image = wallpaper_manager_test_utils::CreateTestImage(
643 640, 480, wallpaper_manager_test_utils::kCustomWallpaperColor); 639 640, 480, wallpaper_manager_test_utils::kCustomWallpaperColor);
644 controller_->SetWallpaperImage(image, WALLPAPER_LAYOUT_STRETCH); 640 controller_->SetWallpaperImage(image, WALLPAPER_LAYOUT_STRETCH);
645 641
646 // Small wallpaper images should be used for configurations less than or 642 // Small wallpaper images should be used for configurations less than or
647 // equal to kSmallWallpaperMaxWidth by kSmallWallpaperMaxHeight, even if 643 // equal to kSmallWallpaperMaxWidth by kSmallWallpaperMaxHeight, even if
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 843
848 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); 844 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId());
849 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); 845 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished();
850 846
851 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( 847 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor(
852 controller_->GetWallpaper(), 848 controller_->GetWallpaper(),
853 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); 849 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor));
854 } 850 }
855 851
856 } // namespace chromeos 852 } // namespace chromeos
OLDNEW
« ash/system/toast/toast_manager_unittest.cc ('K') | « ash/wm/workspace_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698