OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wallpaper_manager.h" | 5 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/desktop_background/desktop_background_controller_observer.h" | 8 #include "ash/desktop_background/desktop_background_controller_observer.h" |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 DesktopBackgroundController* controller_; | 130 DesktopBackgroundController* controller_; |
131 PrefService* local_state_; | 131 PrefService* local_state_; |
132 | 132 |
133 private: | 133 private: |
134 DISALLOW_COPY_AND_ASSIGN(WallpaperManagerBrowserTest); | 134 DISALLOW_COPY_AND_ASSIGN(WallpaperManagerBrowserTest); |
135 }; | 135 }; |
136 | 136 |
137 // The large resolution wallpaper should be loaded when a large external screen | 137 // The large resolution wallpaper should be loaded when a large external screen |
138 // is hooked up. If the external screen is smaller than small wallpaper | 138 // is hooked up. If the external screen is smaller than small wallpaper |
139 // resolution, do not load large resolution wallpaper. | 139 // resolution, do not load large resolution wallpaper. |
140 // | |
141 // Temporarily disabled due to metacity switch: http://crbug.com/167114 | |
142 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, | 140 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, |
143 DISABLED_LoadLargeWallpaperForLargeExternalScreen) { | 141 LoadLargeWallpaperForLargeExternalScreen) { |
144 LogIn(kTestUser1); | 142 LogIn(kTestUser1); |
145 WaitAsyncWallpaperLoad(); | 143 WaitAsyncWallpaperLoad(); |
146 gfx::ImageSkia wallpaper = controller_->GetWallpaper(); | 144 gfx::ImageSkia wallpaper = controller_->GetWallpaper(); |
147 | 145 |
148 // Display is initialized to 800x600. The small resolution default wallpaper | 146 // Display is initialized to 800x600. The small resolution default wallpaper |
149 // is expected. | 147 // is expected. |
150 EXPECT_EQ(kExpectedSmallWallpaperWidth, wallpaper.width()); | 148 EXPECT_EQ(kExpectedSmallWallpaperWidth, wallpaper.width()); |
151 EXPECT_EQ(kExpectedSmallWallpaperHeight, wallpaper.height()); | 149 EXPECT_EQ(kExpectedSmallWallpaperHeight, wallpaper.height()); |
152 | 150 |
153 // Hook up another 800x600 display. | 151 // Hook up another 800x600 display. |
(...skipping 22 matching lines...) Expand all Loading... |
176 WaitAsyncWallpaperLoad(); | 174 WaitAsyncWallpaperLoad(); |
177 wallpaper = controller_->GetWallpaper(); | 175 wallpaper = controller_->GetWallpaper(); |
178 | 176 |
179 // The large resolution default wallpaper is expected. | 177 // The large resolution default wallpaper is expected. |
180 EXPECT_EQ(kExpectedLargeWallpaperWidth, wallpaper.width()); | 178 EXPECT_EQ(kExpectedLargeWallpaperWidth, wallpaper.width()); |
181 EXPECT_EQ(kExpectedLargeWallpaperHeight, wallpaper.height()); | 179 EXPECT_EQ(kExpectedLargeWallpaperHeight, wallpaper.height()); |
182 } | 180 } |
183 | 181 |
184 // This test is similar to LoadLargeWallpaperForExternalScreen test. Instead of | 182 // This test is similar to LoadLargeWallpaperForExternalScreen test. Instead of |
185 // testing default wallpaper, it tests custom wallpaper. | 183 // testing default wallpaper, it tests custom wallpaper. |
186 // | |
187 // Temporarily disabled due to metacity switch: http://crbug.com/167114 | |
188 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, | 184 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, |
189 DISABLED_LoadCustomLargeWallpaperForLargeExternalScreen)
{ | 185 LoadCustomLargeWallpaperForLargeExternalScreen) { |
190 WallpaperManager* wallpaper_manager = WallpaperManager::Get(); | 186 WallpaperManager* wallpaper_manager = WallpaperManager::Get(); |
191 LogIn(kTestUser1); | 187 LogIn(kTestUser1); |
192 // Wait for default wallpaper loaded. | 188 // Wait for default wallpaper loaded. |
193 WaitAsyncWallpaperLoad(); | 189 WaitAsyncWallpaperLoad(); |
194 std::string id = base::Int64ToString(base::Time::Now().ToInternalValue()); | 190 std::string id = base::Int64ToString(base::Time::Now().ToInternalValue()); |
195 base::FilePath small_wallpaper_path = GetCustomWallpaperPath( | 191 base::FilePath small_wallpaper_path = GetCustomWallpaperPath( |
196 kSmallWallpaperSubDir, | 192 kSmallWallpaperSubDir, |
197 kTestUser1, | 193 kTestUser1, |
198 id); | 194 id); |
199 base::FilePath large_wallpaper_path = GetCustomWallpaperPath( | 195 base::FilePath large_wallpaper_path = GetCustomWallpaperPath( |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 448 |
453 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, | 449 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, |
454 UsePreMigrationWallpaperInfo) { | 450 UsePreMigrationWallpaperInfo) { |
455 LogIn(kTestUser1); | 451 LogIn(kTestUser1); |
456 WaitAsyncWallpaperLoad(); | 452 WaitAsyncWallpaperLoad(); |
457 // This test should finish normally. If timeout, it is probably because chrome | 453 // This test should finish normally. If timeout, it is probably because chrome |
458 // can not handle pre migrated user profile (M21 profile or older). | 454 // can not handle pre migrated user profile (M21 profile or older). |
459 } | 455 } |
460 | 456 |
461 } // namepace chromeos | 457 } // namepace chromeos |
OLD | NEW |