chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
// The large resolution wallpaper should be loaded when a large external screen
// is hooked up. If the external screen is smaller than small wallpaper
// resolution, do not load large resolution wallpaper.
The large resolution wallpaper should be loaded when a large external screen
is hooked up. If the external screen is smaller than small wallpaper
resolution, do not load large resolution wallpaper.
The large resolution wallpaper should be loaded when a large external screen is hooked up . If the external screen is smaller than small wallpaper resolution do not load large resolution wallpaper .
IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest,
                       LoadLargeWallpaperForLargeExternalScreen) {
  WallpaperManager* wallpaper_manager = WallpaperManager::Get();
  WallpaperInfo info = {
      "",
      WALLPAPER_LAYOUT_CENTER_CROPPED,
      User::DEFAULT,
      base::Time::Now().LocalMidnight()
  };
  wallpaper_manager->SetUserWallpaperInfo(UserManager::kStubUser, info, true);
  wallpaper_manager->SetUserWallpaper(UserManager::kStubUser);
  WaitAsyncWallpaperLoad();
  gfx::ImageSkia wallpaper = controller_->GetWallpaper();
  EXPECT_EQ(kExpectedSmallWallpaperWidth, wallpaper.width());
  EXPECT_EQ(kExpectedSmallWallpaperHeight, wallpaper.height());
  UpdateDisplay("800x600,800x600");
  EXPECT_EQ(kExpectedSmallWallpaperWidth, wallpaper.width());
  EXPECT_EQ(kExpectedSmallWallpaperHeight, wallpaper.height());
  UpdateDisplay("800x600");
  UpdateDisplay("800x600,2000x2000");
  WaitAsyncWallpaperLoad();
  wallpaper = controller_->GetWallpaper();
  EXPECT_EQ(kExpectedLargeWallpaperWidth, wallpaper.width());
  EXPECT_EQ(kExpectedLargeWallpaperHeight, wallpaper.height());
  UpdateDisplay("800x600");
  UpdateDisplay("800x600,2000x2000");
  WaitAsyncWallpaperLoad();
  wallpaper = controller_->GetWallpaper();
  EXPECT_EQ(kExpectedLargeWallpaperWidth, wallpaper.width());
  EXPECT_EQ(kExpectedLargeWallpaperHeight, wallpaper.height());
}
IN_PROC_BROWSER_TEST_F ( WallpaperManagerBrowserTest , LoadLargeWallpaperForLargeExternalScreen ) { WallpaperManager * wallpaper_manager = WallpaperManager :: Get ( ) ; WallpaperInfo info = { " " , WALLPAPER_LAYOUT_CENTER_CROPPED , User :: DEFAULT , base :: Time :: Now ( ) . LocalMidnight ( ) } ; wallpaper_manager -> SetUserWallpaperInfo ( UserManager :: kStubUser , info , true ) ; wallpaper_manager -> SetUserWallpaper ( UserManager :: kStubUser ) ; WaitAsyncWallpaperLoad ( ) ; gfx :: ImageSkia wallpaper = controller_ -> GetWallpaper ( ) ; EXPECT_EQ ( kExpectedSmallWallpaperWidth , wallpaper . width ( ) ) ; EXPECT_EQ ( kExpectedSmallWallpaperHeight , wallpaper . height ( ) ) ; UpdateDisplay ( " " ) ; EXPECT_EQ ( kExpectedSmallWallpaperWidth , wallpaper . width ( ) ) ; EXPECT_EQ ( kExpectedSmallWallpaperHeight , wallpaper . height ( ) ) ; UpdateDisplay ( " " ) ; UpdateDisplay ( " " ) ; WaitAsyncWallpaperLoad ( ) ; wallpaper = controller_ -> GetWallpaper ( ) ; EXPECT_EQ ( kExpectedLargeWallpaperWidth , wallpaper . width ( ) ) ; EXPECT_EQ ( kExpectedLargeWallpaperHeight , wallpaper . height ( ) ) ; UpdateDisplay ( " " ) ; UpdateDisplay ( " " ) ; WaitAsyncWallpaperLoad ( ) ; wallpaper = controller_ -> GetWallpaper ( ) ; EXPECT_EQ ( kExpectedLargeWallpaperWidth , wallpaper . width ( ) ) ; EXPECT_EQ ( kExpectedLargeWallpaperHeight , wallpaper . height ( ) ) ; }
The large resolution wallpaper should be loaded when a large external screen
is hooked up.
The large resolution wallpaper should be loaded when a large external screen is hooked up .
// Display is initialized to 800x600. The small resolution default wallpaper // is expected. // Hook up another 800x600 display. // The small resolution wallpaper is expected. // Detach the secondary display. // Hook up a 2000x2000 display. The large resolution default wallpaper should // be loaded. // The large resolution default wallpaper is expected. // Detach the secondary display. // Hook up the 2000x2000 display again. The large resolution default wallpaper // should persist. Test for crbug/165788. // The large resolution default wallpaper is expected.