| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 local_state_(NULL) { | 224 local_state_(NULL) { |
| 225 } | 225 } |
| 226 | 226 |
| 227 virtual ~CustomizationWallpaperDownloaderBrowserTest() {} | 227 virtual ~CustomizationWallpaperDownloaderBrowserTest() {} |
| 228 | 228 |
| 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(base::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 TearDownOnMainThread() 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()); |
| (...skipping 66 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 |