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

Side by Side Diff: chrome/browser/chromeos/login/kiosk_browsertest.cc

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <memory> 5 #include <memory>
6 #include <vector> 6 #include <vector>
7 7
8 #include "apps/test/app_window_waiter.h" 8 #include "apps/test/app_window_waiter.h"
9 #include "ash/common/wallpaper/wallpaper_controller.h" 9 #include "ash/common/wallpaper/wallpaper_controller.h"
10 #include "ash/common/wallpaper/wallpaper_controller_observer.h" 10 #include "ash/common/wallpaper/wallpaper_controller_observer.h"
11 #include "ash/common/wm_shell.h" 11 #include "ash/shell.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/run_loop.h" 17 #include "base/run_loop.h"
18 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/synchronization/lock.h" 20 #include "base/synchronization/lock.h"
21 #include "base/sys_info.h" 21 #include "base/sys_info.h"
(...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 // KioskTest overrides: 2322 // KioskTest overrides:
2323 void SetUpCommandLine(base::CommandLine* command_line) override { 2323 void SetUpCommandLine(base::CommandLine* command_line) override {
2324 KioskTest::SetUpCommandLine(command_line); 2324 KioskTest::SetUpCommandLine(command_line);
2325 command_line->AppendSwitch(switches::kDisableBootAnimation); 2325 command_line->AppendSwitch(switches::kDisableBootAnimation);
2326 } 2326 }
2327 2327
2328 void SetUpOnMainThread() override { 2328 void SetUpOnMainThread() override {
2329 LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest(); 2329 LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest();
2330 2330
2331 KioskTest::SetUpOnMainThread(); 2331 KioskTest::SetUpOnMainThread();
2332 ash::WmShell::Get()->wallpaper_controller()->AddObserver(this); 2332 ash::Shell::GetInstance()->wallpaper_controller()->AddObserver(this);
2333 } 2333 }
2334 2334
2335 void TearDownOnMainThread() override { 2335 void TearDownOnMainThread() override {
2336 ash::WmShell::Get()->wallpaper_controller()->RemoveObserver(this); 2336 ash::Shell::GetInstance()->wallpaper_controller()->RemoveObserver(this);
2337 KioskTest::TearDownOnMainThread(); 2337 KioskTest::TearDownOnMainThread();
2338 } 2338 }
2339 2339
2340 void WaitForWallpaper() { 2340 void WaitForWallpaper() {
2341 if (!wallpaper_loaded_) { 2341 if (!wallpaper_loaded_) {
2342 runner_ = new content::MessageLoopRunner; 2342 runner_ = new content::MessageLoopRunner;
2343 runner_->Run(); 2343 runner_->Run();
2344 } 2344 }
2345 } 2345 }
2346 2346
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 content::WindowedNotificationObserver( 2385 content::WindowedNotificationObserver(
2386 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, 2386 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE,
2387 content::NotificationService::AllSources()).Wait(); 2387 content::NotificationService::AllSources()).Wait();
2388 2388
2389 // Wait for the wallpaper to load. 2389 // Wait for the wallpaper to load.
2390 WaitForWallpaper(); 2390 WaitForWallpaper();
2391 EXPECT_TRUE(wallpaper_loaded()); 2391 EXPECT_TRUE(wallpaper_loaded());
2392 } 2392 }
2393 2393
2394 } // namespace chromeos 2394 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698