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 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" | 5 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // If the login display is still showing, exit gracefully. | 73 // If the login display is still showing, exit gracefully. |
74 if (LoginDisplayHostImpl::default_host()) { | 74 if (LoginDisplayHostImpl::default_host()) { |
75 base::MessageLoop::current()->PostTask(FROM_HERE, | 75 base::MessageLoop::current()->PostTask(FROM_HERE, |
76 base::Bind(&chrome::AttemptExit)); | 76 base::Bind(&chrome::AttemptExit)); |
77 content::RunMessageLoop(); | 77 content::RunMessageLoop(); |
78 } | 78 } |
79 | 79 |
80 ExtensionApiTest::TearDownOnMainThread(); | 80 ExtensionApiTest::TearDownOnMainThread(); |
81 } | 81 } |
82 | 82 |
83 void OobeBaseTest::SetUpCommandLine(CommandLine* command_line) { | 83 void OobeBaseTest::SetUpCommandLine(base::CommandLine* command_line) { |
84 ExtensionApiTest::SetUpCommandLine(command_line); | 84 ExtensionApiTest::SetUpCommandLine(command_line); |
85 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 85 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
86 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); | 86 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); |
87 if (!needs_background_networking_) | 87 if (!needs_background_networking_) |
88 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking); | 88 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking); |
89 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); | 89 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); |
90 | 90 |
91 // Create gaia and webstore URL from test server url but using different | 91 // Create gaia and webstore URL from test server url but using different |
92 // host names. This is to avoid gaia response being tagged as from | 92 // host names. This is to avoid gaia response being tagged as from |
93 // webstore in chrome_resource_dispatcher_host_delegate.cc. | 93 // webstore in chrome_resource_dispatcher_host_delegate.cc. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() { | 164 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() { |
165 ExistingUserController* controller = | 165 ExistingUserController* controller = |
166 ExistingUserController::current_controller(); | 166 ExistingUserController::current_controller(); |
167 CHECK(controller); | 167 CHECK(controller); |
168 return static_cast<WebUILoginDisplay*>( | 168 return static_cast<WebUILoginDisplay*>( |
169 controller->login_display()); | 169 controller->login_display()); |
170 } | 170 } |
171 | 171 |
172 } // namespace chromeos | 172 } // namespace chromeos |
OLD | NEW |