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/ash_resources/grit/ash_wallpaper_resources.h" | 7 #include "ash/ash_resources/grit/ash_wallpaper_resources.h" |
8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
9 #include "ash/desktop_background/desktop_background_controller_observer.h" | 9 #include "ash/desktop_background/desktop_background_controller_observer.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 WaitAsyncWallpaperLoad(); | 284 WaitAsyncWallpaperLoad(); |
285 EXPECT_EQ(2, LoadedWallpapers()); | 285 EXPECT_EQ(2, LoadedWallpapers()); |
286 wallpaper_manager->UpdateWallpaper(); | 286 wallpaper_manager->UpdateWallpaper(); |
287 // Wait for wallpaper migration and refresh. Note: the migration is guarantee | 287 // Wait for wallpaper migration and refresh. Note: the migration is guarantee |
288 // to finish before wallpaper refresh finish. This is guarantted by sequence | 288 // to finish before wallpaper refresh finish. This is guarantted by sequence |
289 // worker pool we use. | 289 // worker pool we use. |
290 WaitAsyncWallpaperLoad(); | 290 WaitAsyncWallpaperLoad(); |
291 EXPECT_EQ(3, LoadedWallpapers()); | 291 EXPECT_EQ(3, LoadedWallpapers()); |
292 base::FilePath new_wallpaper_path = GetCustomWallpaperPath( | 292 base::FilePath new_wallpaper_path = GetCustomWallpaperPath( |
293 kOriginalWallpaperSubDir, kTestUser1, "DUMMY"); | 293 kOriginalWallpaperSubDir, kTestUser1, "DUMMY"); |
294 EXPECT_FALSE(file_util::PathExists(old_wallpaper_path)); | 294 EXPECT_FALSE(base::PathExists(old_wallpaper_path)); |
295 EXPECT_TRUE(file_util::PathExists(new_wallpaper_path)); | 295 EXPECT_TRUE(base::PathExists(new_wallpaper_path)); |
296 } | 296 } |
297 | 297 |
298 // Some users have old user profiles which may have legacy wallpapers. And these | 298 // Some users have old user profiles which may have legacy wallpapers. And these |
299 // lagacy wallpapers should migrate to new wallpaper picker version seamlessly. | 299 // lagacy wallpapers should migrate to new wallpaper picker version seamlessly. |
300 // This tests make sure we compatible with migrated old wallpapers. | 300 // This tests make sure we compatible with migrated old wallpapers. |
301 // crosbug.com/38429 | 301 // crosbug.com/38429 |
302 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, | 302 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, |
303 PRE_UseMigratedWallpaperInfo) { | 303 PRE_UseMigratedWallpaperInfo) { |
304 // New user log in, a default wallpaper is loaded. | 304 // New user log in, a default wallpaper is loaded. |
305 LogIn(kTestUser1); | 305 LogIn(kTestUser1); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 400 |
401 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, | 401 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, |
402 UsePreMigrationWallpaperInfo) { | 402 UsePreMigrationWallpaperInfo) { |
403 LogIn(kTestUser1); | 403 LogIn(kTestUser1); |
404 WaitAsyncWallpaperLoad(); | 404 WaitAsyncWallpaperLoad(); |
405 // This test should finish normally. If timeout, it is probably because chrome | 405 // This test should finish normally. If timeout, it is probably because chrome |
406 // can not handle pre migrated user profile (M21 profile or older). | 406 // can not handle pre migrated user profile (M21 profile or older). |
407 } | 407 } |
408 | 408 |
409 } // namespace chromeos | 409 } // namespace chromeos |
OLD | NEW |