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

Side by Side Diff: chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.cc

Issue 2318223003: mash: Migrate wallpaper controllers to ash/common. (Closed)
Patch Set: Fix nit. Created 4 years, 3 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
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/common/wallpaper/wallpaper_controller.h"
10 #include "ash/wallpaper/wallpaper_controller.h" 10 #include "ash/common/wm_shell.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/browser/chromeos/customization/customization_document.h" 16 #include "chrome/browser/chromeos/customization/customization_document.h"
17 #include "chrome/browser/chromeos/customization/customization_wallpaper_download er.h" 17 #include "chrome/browser/chromeos/customization/customization_wallpaper_download er.h"
18 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 18 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
19 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_test_u tils.h" 19 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_test_u tils.h"
20 #include "chrome/test/base/in_process_browser_test.h" 20 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 : public InProcessBrowserTest { 221 : public InProcessBrowserTest {
222 public: 222 public:
223 CustomizationWallpaperDownloaderBrowserTest() 223 CustomizationWallpaperDownloaderBrowserTest()
224 : controller_(NULL), 224 : controller_(NULL),
225 local_state_(NULL) { 225 local_state_(NULL) {
226 } 226 }
227 227
228 ~CustomizationWallpaperDownloaderBrowserTest() override {} 228 ~CustomizationWallpaperDownloaderBrowserTest() override {}
229 229
230 void SetUpOnMainThread() override { 230 void SetUpOnMainThread() override {
231 controller_ = ash::Shell::GetInstance()->wallpaper_controller(); 231 controller_ = ash::WmShell::Get()->wallpaper_controller();
232 local_state_ = g_browser_process->local_state(); 232 local_state_ = g_browser_process->local_state();
233 } 233 }
234 234
235 void SetUpCommandLine(base::CommandLine* command_line) override { 235 void SetUpCommandLine(base::CommandLine* command_line) override {
236 command_line->AppendSwitch(chromeos::switches::kLoginManager); 236 command_line->AppendSwitch(chromeos::switches::kLoginManager);
237 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); 237 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
238 } 238 }
239 239
240 void TearDownOnMainThread() override { controller_ = NULL; } 240 void TearDownOnMainThread() override { controller_ = NULL; }
241 241
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 observer.WaitForWallpaperAnimationFinished(); 313 observer.WaitForWallpaperAnimationFinished();
314 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( 314 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor(
315 controller_->GetWallpaper(), 315 controller_->GetWallpaper(),
316 wallpaper_manager_test_utils::kCustomWallpaperColor)); 316 wallpaper_manager_test_utils::kCustomWallpaperColor));
317 317
318 EXPECT_EQ(2U, url_factory.num_attempts()); 318 EXPECT_EQ(2U, url_factory.num_attempts());
319 } 319 }
320 320
321 } // namespace chromeos 321 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/wallpaper/wallpaper_widget_controller.cc ('k') | chrome/browser/chromeos/login/kiosk_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698