| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 return true; | 160 return true; |
| 161 } | 161 } |
| 162 | 162 |
| 163 void WaitAsyncWallpaperLoadFinished() { | 163 void WaitAsyncWallpaperLoadFinished() { |
| 164 TestWallpaperObserverPendingListEmpty observer(WallpaperManager::Get()); | 164 TestWallpaperObserverPendingListEmpty observer(WallpaperManager::Get()); |
| 165 observer.WaitForPendingListEmpty(); | 165 observer.WaitForPendingListEmpty(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void CreateCmdlineWallpapers(const base::ScopedTempDir& dir, | 168 void CreateCmdlineWallpapers(const base::ScopedTempDir& dir, |
| 169 scoped_ptr<base::CommandLine>* command_line) { | 169 std::unique_ptr<base::CommandLine>* command_line) { |
| 170 std::vector<std::string> options; | 170 std::vector<std::string> options; |
| 171 options.push_back(std::string("WM_Test_cmdline")); | 171 options.push_back(std::string("WM_Test_cmdline")); |
| 172 const base::FilePath small_file = | 172 const base::FilePath small_file = |
| 173 dir.path().Append(FILE_PATH_LITERAL("small.jpg")); | 173 dir.path().Append(FILE_PATH_LITERAL("small.jpg")); |
| 174 options.push_back(std::string("--") + | 174 options.push_back(std::string("--") + |
| 175 chromeos::switches::kDefaultWallpaperSmall + "=" + | 175 chromeos::switches::kDefaultWallpaperSmall + "=" + |
| 176 small_file.value()); | 176 small_file.value()); |
| 177 const base::FilePath large_file = | 177 const base::FilePath large_file = |
| 178 dir.path().Append(FILE_PATH_LITERAL("large.jpg")); | 178 dir.path().Append(FILE_PATH_LITERAL("large.jpg")); |
| 179 options.push_back(std::string("--") + | 179 options.push_back(std::string("--") + |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 kWallpaperSize, | 225 kWallpaperSize, |
| 226 kLargeChildWallpaperColor)); | 226 kLargeChildWallpaperColor)); |
| 227 | 227 |
| 228 command_line->reset(new base::CommandLine(options)); | 228 command_line->reset(new base::CommandLine(options)); |
| 229 WallpaperManager::Get()->SetCommandLineForTesting(command_line->get()); | 229 WallpaperManager::Get()->SetCommandLineForTesting(command_line->get()); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace wallpaper_manager_test_utils | 232 } // namespace wallpaper_manager_test_utils |
| 233 | 233 |
| 234 } // namespace chromeos | 234 } // namespace chromeos |
| OLD | NEW |