| 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 | 5 |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 virtual void SetUpOnMainThread() OVERRIDE { | 229 virtual void SetUpOnMainThread() OVERRIDE { |
| 230 controller_ = ash::Shell::GetInstance()->desktop_background_controller(); | 230 controller_ = ash::Shell::GetInstance()->desktop_background_controller(); |
| 231 local_state_ = g_browser_process->local_state(); | 231 local_state_ = g_browser_process->local_state(); |
| 232 } | 232 } |
| 233 | 233 |
| 234 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 234 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 235 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 235 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
| 236 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); | 236 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); |
| 237 } | 237 } |
| 238 | 238 |
| 239 virtual void CleanUpOnMainThread() OVERRIDE { controller_ = NULL; } | 239 virtual void TearDownOnMainThread() OVERRIDE { controller_ = NULL; } |
| 240 | 240 |
| 241 protected: | 241 protected: |
| 242 void CreateCmdlineWallpapers() { | 242 void CreateCmdlineWallpapers() { |
| 243 cmdline_wallpaper_dir_.reset(new base::ScopedTempDir); | 243 cmdline_wallpaper_dir_.reset(new base::ScopedTempDir); |
| 244 ASSERT_TRUE(cmdline_wallpaper_dir_->CreateUniqueTempDir()); | 244 ASSERT_TRUE(cmdline_wallpaper_dir_->CreateUniqueTempDir()); |
| 245 wallpaper_manager_test_utils::CreateCmdlineWallpapers( | 245 wallpaper_manager_test_utils::CreateCmdlineWallpapers( |
| 246 *cmdline_wallpaper_dir_, &wallpaper_manager_command_line_); | 246 *cmdline_wallpaper_dir_, &wallpaper_manager_command_line_); |
| 247 } | 247 } |
| 248 | 248 |
| 249 ash::DesktopBackgroundController* controller_; | 249 ash::DesktopBackgroundController* controller_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 observer.WaitForWallpaperAnimationFinished(); | 312 observer.WaitForWallpaperAnimationFinished(); |
| 313 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 313 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 314 controller_->GetWallpaper(), | 314 controller_->GetWallpaper(), |
| 315 wallpaper_manager_test_utils::kCustomWallpaperColor)); | 315 wallpaper_manager_test_utils::kCustomWallpaperColor)); |
| 316 | 316 |
| 317 EXPECT_EQ(2U, url_factory.num_attempts()); | 317 EXPECT_EQ(2U, url_factory.num_attempts()); |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace chromeos | 320 } // namespace chromeos |
| OLD | NEW |