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_test_u
tils.h" | 5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_test_u
tils.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 : empty_(false), wallpaper_manager_(wallpaper_manager) { | 30 : empty_(false), wallpaper_manager_(wallpaper_manager) { |
31 DCHECK(wallpaper_manager_); | 31 DCHECK(wallpaper_manager_); |
32 wallpaper_manager_->AddObserver(this); | 32 wallpaper_manager_->AddObserver(this); |
33 } | 33 } |
34 | 34 |
35 virtual ~TestWallpaperObserverPendingListEmpty() { | 35 virtual ~TestWallpaperObserverPendingListEmpty() { |
36 wallpaper_manager_->RemoveObserver(this); | 36 wallpaper_manager_->RemoveObserver(this); |
37 } | 37 } |
38 | 38 |
39 virtual void OnWallpaperAnimationFinished( | 39 virtual void OnWallpaperAnimationFinished( |
40 const std::string& user_id) OVERRIDE {} | 40 const std::string& user_id) override {} |
41 | 41 |
42 virtual void OnPendingListEmptyForTesting() OVERRIDE { | 42 virtual void OnPendingListEmptyForTesting() override { |
43 empty_ = true; | 43 empty_ = true; |
44 base::MessageLoop::current()->Quit(); | 44 base::MessageLoop::current()->Quit(); |
45 } | 45 } |
46 | 46 |
47 void WaitForPendingListEmpty() { | 47 void WaitForPendingListEmpty() { |
48 if (wallpaper_manager_->GetPendingListSizeForTesting() == 0) { | 48 if (wallpaper_manager_->GetPendingListSizeForTesting() == 0) { |
49 empty_ = true; | 49 empty_ = true; |
50 return; | 50 return; |
51 } | 51 } |
52 while (!empty_) | 52 while (!empty_) |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 kWallpaperSize, | 198 kWallpaperSize, |
199 kLargeGuestWallpaperColor)); | 199 kLargeGuestWallpaperColor)); |
200 | 200 |
201 command_line->reset(new base::CommandLine(options)); | 201 command_line->reset(new base::CommandLine(options)); |
202 WallpaperManager::Get()->SetCommandLineForTesting(command_line->get()); | 202 WallpaperManager::Get()->SetCommandLineForTesting(command_line->get()); |
203 } | 203 } |
204 | 204 |
205 } // namespace wallpaper_manager_test_utils | 205 } // namespace wallpaper_manager_test_utils |
206 | 206 |
207 } // namespace chromeos | 207 } // namespace chromeos |
OLD | NEW |