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 "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/desktop_background/desktop_background_controller_test_api.h" | 9 #include "ash/desktop_background/desktop_background_controller_test_api.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 }; | 420 }; |
421 | 421 |
422 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestCrashRestore, | 422 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestCrashRestore, |
423 PRE_RestoreWallpaper) { | 423 PRE_RestoreWallpaper) { |
424 LogIn(kTestUser1, kTestUser1Hash); | 424 LogIn(kTestUser1, kTestUser1Hash); |
425 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 425 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
426 } | 426 } |
427 | 427 |
428 // Test for crbug.com/270278. It simulates a browser crash and verifies if user | 428 // Test for crbug.com/270278. It simulates a browser crash and verifies if user |
429 // wallpaper is loaded. | 429 // wallpaper is loaded. |
| 430 // Fails on the MSAN bots. See http://crbug.com/444477 |
| 431 #if defined(MEMORY_SANITIZER) |
| 432 #define MAYBE_RestoreWallpaper DISABLED_RestoreWallpaper |
| 433 #else |
| 434 #define MAYBE_RestoreWallpaper RestoreWallpaper |
| 435 #endif |
430 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestCrashRestore, | 436 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestCrashRestore, |
431 RestoreWallpaper) { | 437 MAYBE_RestoreWallpaper) { |
432 EXPECT_EQ(1, LoadedWallpapers()); | 438 EXPECT_EQ(1, LoadedWallpapers()); |
433 } | 439 } |
434 | 440 |
435 class WallpaperManagerBrowserTestCacheUpdate | 441 class WallpaperManagerBrowserTestCacheUpdate |
436 : public WallpaperManagerBrowserTest { | 442 : public WallpaperManagerBrowserTest { |
437 public: | 443 public: |
438 virtual void SetUpCommandLine(CommandLine* command_line) override { | 444 virtual void SetUpCommandLine(CommandLine* command_line) override { |
439 command_line->AppendSwitchASCII(switches::kLoginUser, kTestUser1); | 445 command_line->AppendSwitchASCII(switches::kLoginUser, kTestUser1); |
440 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 446 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
441 } | 447 } |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 | 789 |
784 WallpaperManager::Get()->SetDefaultWallpaperNow(std::string()); | 790 WallpaperManager::Get()->SetDefaultWallpaperNow(std::string()); |
785 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 791 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
786 | 792 |
787 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 793 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
788 controller_->GetWallpaper(), | 794 controller_->GetWallpaper(), |
789 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 795 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
790 } | 796 } |
791 | 797 |
792 } // namespace chromeos | 798 } // namespace chromeos |
OLD | NEW |