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

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

Issue 10590004: [cros] Fake a stub user login when no --login-manager and --login-user are given. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 5 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/chromeos/login/wizard_in_process_browser_test.h" 5 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/chromeos/login/base_login_display_host.h" 9 #include "chrome/browser/chromeos/login/base_login_display_host.h"
10 #include "chrome/browser/chromeos/login/login_wizard.h" 10 #include "chrome/browser/chromeos/login/login_wizard.h"
11 #include "chrome/browser/chromeos/login/wizard_controller.h" 11 #include "chrome/browser/chromeos/login/wizard_controller.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/test/base/ui_test_utils.h" 15 #include "chrome/test/base/ui_test_utils.h"
16 #include "content/public/browser/notification_service.h" 16 #include "content/public/browser/notification_service.h"
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 WizardInProcessBrowserTest::WizardInProcessBrowserTest(const char* screen_name) 20 WizardInProcessBrowserTest::WizardInProcessBrowserTest(const char* screen_name)
21 : screen_name_(screen_name), 21 : screen_name_(screen_name),
22 host_(NULL) { 22 host_(NULL) {
23 } 23 }
24 24
25 void WizardInProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) { 25 void WizardInProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) {
26 command_line->AppendSwitch(switches::kNoStartupWindow); 26 command_line->AppendSwitch(switches::kNoStartupWindow);
27 command_line->AppendSwitch(switches::kLoginManager);
27 } 28 }
28 29
29 void WizardInProcessBrowserTest::SetUpOnMainThread() { 30 void WizardInProcessBrowserTest::SetUpOnMainThread() {
30 SetUpWizard(); 31 SetUpWizard();
31 32
32 WizardController::SetZeroDelays(); 33 WizardController::SetZeroDelays();
33 34
34 if (!screen_name_.empty()) { 35 if (!screen_name_.empty()) {
35 ShowLoginWizard(screen_name_, gfx::Size(1024, 600)); 36 ShowLoginWizard(screen_name_, gfx::Size(1024, 600));
36 host_ = BaseLoginDisplayHost::default_host(); 37 host_ = BaseLoginDisplayHost::default_host();
37 } 38 }
38 } 39 }
39 40
40 void WizardInProcessBrowserTest::CleanUpOnMainThread() { 41 void WizardInProcessBrowserTest::CleanUpOnMainThread() {
41 // LoginDisplayHost owns controllers and all windows. 42 // LoginDisplayHost owns controllers and all windows.
42 MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_); 43 MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_);
43 44
44 ui_test_utils::RunMessageLoop(); 45 ui_test_utils::RunMessageLoop();
45 } 46 }
46 47
47 } // namespace chromeos 48 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/chromeos/system/drm_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698