Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2084)

Side by Side Diff: chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Update the display configuration as given in |display_specs|. 78 // Update the display configuration as given in |display_specs|.
79 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more 79 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more
80 // details. 80 // details.
81 void UpdateDisplay(const std::string& display_specs) { 81 void UpdateDisplay(const std::string& display_specs) {
82 ash::test::DisplayManagerTestApi display_manager_test_api( 82 ash::test::DisplayManagerTestApi display_manager_test_api(
83 ash::Shell::GetInstance()->display_manager()); 83 ash::Shell::GetInstance()->display_manager());
84 display_manager_test_api.UpdateDisplay(display_specs); 84 display_manager_test_api.UpdateDisplay(display_specs);
85 } 85 }
86 86
87 void WaitAsyncWallpaperLoad() { 87 void WaitAsyncWallpaperLoad() {
88 MessageLoop::current()->Run(); 88 base::MessageLoop::current()->Run();
89 } 89 }
90 90
91 virtual void OnWallpaperDataChanged() OVERRIDE { 91 virtual void OnWallpaperDataChanged() OVERRIDE {
92 MessageLoop::current()->Quit(); 92 base::MessageLoop::current()->Quit();
93 } 93 }
94 94
95 protected: 95 protected:
96 // Return custom wallpaper path. Create directory if not exist. 96 // Return custom wallpaper path. Create directory if not exist.
97 base::FilePath GetCustomWallpaperPath(const char* sub_dir, 97 base::FilePath GetCustomWallpaperPath(const char* sub_dir,
98 const std::string& email, 98 const std::string& email,
99 const std::string& id) { 99 const std::string& id) {
100 base::FilePath wallpaper_path = 100 base::FilePath wallpaper_path =
101 WallpaperManager::Get()->GetCustomWallpaperPath(sub_dir, email, id); 101 WallpaperManager::Get()->GetCustomWallpaperPath(sub_dir, email, id);
102 if (!file_util::DirectoryExists(wallpaper_path.DirName())) 102 if (!file_util::DirectoryExists(wallpaper_path.DirName()))
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, 458 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation,
459 UsePreMigrationWallpaperInfo) { 459 UsePreMigrationWallpaperInfo) {
460 LogIn(kTestUser1); 460 LogIn(kTestUser1);
461 WaitAsyncWallpaperLoad(); 461 WaitAsyncWallpaperLoad();
462 // This test should finish normally. If timeout, it is probably because chrome 462 // This test should finish normally. If timeout, it is probably because chrome
463 // can not handle pre migrated user profile (M21 profile or older). 463 // can not handle pre migrated user profile (M21 profile or older).
464 } 464 }
465 465
466 } // namepace chromeos 466 } // namepace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_unittest.cc ('k') | chrome/browser/chromeos/login/wizard_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698