| 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" |
| 11 #include "ash/test/display_manager_test_api.h" | 11 #include "ash/test/display_manager_test_api.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 18 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
| 19 #include "chrome/browser/chromeos/login/user.h" | 19 #include "chrome/browser/chromeos/login/user.h" |
| 20 #include "chrome/browser/chromeos/login/user_manager.h" | 20 #include "chrome/browser/chromeos/login/user_manager.h" |
| 21 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 21 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 23 #include "chrome/test/base/testing_browser_process.h" | 23 #include "chrome/test/base/testing_browser_process.h" |
| 24 #include "chromeos/chromeos_switches.h" | |
| 25 #include "ui/aura/env.h" | 24 #include "ui/aura/env.h" |
| 26 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
| 27 | 26 |
| 28 using namespace ash; | 27 using namespace ash; |
| 29 | 28 |
| 30 namespace chromeos { | 29 namespace chromeos { |
| 31 | 30 |
| 32 namespace { | 31 namespace { |
| 33 | 32 |
| 34 #if defined(GOOGLE_CHROME_BUILD) | 33 #if defined(GOOGLE_CHROME_BUILD) |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 // This test should finish normally. If timeout, it is probably because chrome | 401 // This test should finish normally. If timeout, it is probably because chrome |
| 403 // can not handle pre migrated user profile (M21 profile or older). | 402 // can not handle pre migrated user profile (M21 profile or older). |
| 404 } | 403 } |
| 405 | 404 |
| 406 class WallpaperManagerBrowserTestNoAnimation | 405 class WallpaperManagerBrowserTestNoAnimation |
| 407 : public WallpaperManagerBrowserTest { | 406 : public WallpaperManagerBrowserTest { |
| 408 public: | 407 public: |
| 409 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 408 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 410 command_line->AppendSwitch(switches::kLoginManager); | 409 command_line->AppendSwitch(switches::kLoginManager); |
| 411 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 410 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| 412 command_line->AppendSwitch(::switches::kDisableLoginAnimations); | 411 command_line->AppendSwitch(switches::kDisableLoginAnimations); |
| 413 command_line->AppendSwitch(::switches::kDisableBootAnimation); | 412 command_line->AppendSwitch(switches::kDisableBootAnimation); |
| 414 } | 413 } |
| 415 }; | 414 }; |
| 416 | 415 |
| 417 // Same test as WallpaperManagerBrowserTest.UseMigratedWallpaperInfo. But | 416 // Same test as WallpaperManagerBrowserTest.UseMigratedWallpaperInfo. But |
| 418 // disabled boot and login animation. | 417 // disabled boot and login animation. |
| 419 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, | 418 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, |
| 420 PRE_UseMigratedWallpaperInfo) { | 419 PRE_UseMigratedWallpaperInfo) { |
| 421 // New user log in, a default wallpaper is loaded. | 420 // New user log in, a default wallpaper is loaded. |
| 422 LogIn(kTestUser1); | 421 LogIn(kTestUser1); |
| 423 WaitAsyncWallpaperLoad(); | 422 WaitAsyncWallpaperLoad(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 456 |
| 458 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, | 457 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, |
| 459 UsePreMigrationWallpaperInfo) { | 458 UsePreMigrationWallpaperInfo) { |
| 460 LogIn(kTestUser1); | 459 LogIn(kTestUser1); |
| 461 WaitAsyncWallpaperLoad(); | 460 WaitAsyncWallpaperLoad(); |
| 462 // This test should finish normally. If timeout, it is probably because chrome | 461 // This test should finish normally. If timeout, it is probably because chrome |
| 463 // can not handle pre migrated user profile (M21 profile or older). | 462 // can not handle pre migrated user profile (M21 profile or older). |
| 464 } | 463 } |
| 465 | 464 |
| 466 } // namepace chromeos | 465 } // namepace chromeos |
| OLD | NEW |