| OLD | NEW |
| 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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 chromeos::login::GuestAccountId(), chromeos::login::kGuestUserName, | 785 chromeos::login::GuestAccountId(), chromeos::login::kGuestUserName, |
| 786 false); | 786 false); |
| 787 UpdateDisplay("1600x1200"); | 787 UpdateDisplay("1600x1200"); |
| 788 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 788 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
| 789 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 789 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 790 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 790 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 791 controller_->GetWallpaper(), | 791 controller_->GetWallpaper(), |
| 792 wallpaper_manager_test_utils::kLargeGuestWallpaperColor)); | 792 wallpaper_manager_test_utils::kLargeGuestWallpaperColor)); |
| 793 } | 793 } |
| 794 | 794 |
| 795 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, SmallChildWallpaper) { | 795 // Fails (crbug/657180) |
| 796 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, |
| 797 DISABLED_SmallChildWallpaper) { |
| 796 if (!ash::test::AshTestHelper::SupportsMultipleDisplays()) | 798 if (!ash::test::AshTestHelper::SupportsMultipleDisplays()) |
| 797 return; | 799 return; |
| 798 CreateCmdlineWallpapers(); | 800 CreateCmdlineWallpapers(); |
| 799 LogInAsChild(test_account_id1_, kTestUser1Hash); | 801 LogInAsChild(test_account_id1_, kTestUser1Hash); |
| 800 UpdateDisplay("800x600"); | 802 UpdateDisplay("800x600"); |
| 801 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 803 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
| 802 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 804 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 803 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 805 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 804 controller_->GetWallpaper(), | 806 controller_->GetWallpaper(), |
| 805 wallpaper_manager_test_utils::kSmallChildWallpaperColor)); | 807 wallpaper_manager_test_utils::kSmallChildWallpaperColor)); |
| 806 } | 808 } |
| 807 | 809 |
| 808 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, LargeChildWallpaper) { | 810 // Fails (crbug/657180) |
| 811 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, |
| 812 DISABLED_LargeChildWallpaper) { |
| 809 if (!ash::test::AshTestHelper::SupportsMultipleDisplays()) | 813 if (!ash::test::AshTestHelper::SupportsMultipleDisplays()) |
| 810 return; | 814 return; |
| 811 | 815 |
| 812 CreateCmdlineWallpapers(); | 816 CreateCmdlineWallpapers(); |
| 813 LogInAsChild(test_account_id1_, kTestUser1Hash); | 817 LogInAsChild(test_account_id1_, kTestUser1Hash); |
| 814 UpdateDisplay("1600x1200"); | 818 UpdateDisplay("1600x1200"); |
| 815 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 819 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
| 816 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 820 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 817 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 821 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 818 controller_->GetWallpaper(), | 822 controller_->GetWallpaper(), |
| (...skipping 26 matching lines...) Expand all Loading... |
| 845 | 849 |
| 846 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 850 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
| 847 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 851 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 848 | 852 |
| 849 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 853 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 850 controller_->GetWallpaper(), | 854 controller_->GetWallpaper(), |
| 851 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 855 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
| 852 } | 856 } |
| 853 | 857 |
| 854 } // namespace chromeos | 858 } // namespace chromeos |
| OLD | NEW |