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

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

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h"
6
7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
11 #include "chrome/browser/chromeos/login/login_wizard.h"
12 #include "chrome/browser/chromeos/login/wizard_controller.h"
13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/test/base/ui_test_utils.h"
16 #include "chromeos/chromeos_switches.h"
17 #include "content/public/browser/notification_service.h"
18
19 namespace chromeos {
20
21 WizardInProcessBrowserTest::WizardInProcessBrowserTest(const char* screen_name)
22 : screen_name_(screen_name),
23 host_(NULL) {
24 }
25
26 void WizardInProcessBrowserTest::SetUp() {
27 WizardController::SetZeroDelays();
28 InProcessBrowserTest::SetUp();
29 }
30
31 void WizardInProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) {
32 command_line->AppendSwitch(::switches::kNoStartupWindow);
33 command_line->AppendSwitch(switches::kLoginManager);
34 }
35
36 void WizardInProcessBrowserTest::SetUpOnMainThread() {
37 SetUpWizard();
38 if (!screen_name_.empty()) {
39 ShowLoginWizard(screen_name_);
40 host_ = LoginDisplayHostImpl::default_host();
41 }
42 }
43
44 void WizardInProcessBrowserTest::CleanUpOnMainThread() {
45 // LoginDisplayHost owns controllers and all windows.
46 base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_);
47
48 base::MessageLoopForUI::current()->RunUntilIdle();
49 }
50
51 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698