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

Side by Side Diff: chrome/browser/chromeos/login/test/oobe_base_test.cc

Issue 1536553002: Remove InlineLoginHandlerChromeOS and exclude InlineLoginUI from CrOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge conflicts resolved. Created 4 years, 11 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 "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"
11 #include "chrome/browser/chromeos/login/existing_user_controller.h" 11 #include "chrome/browser/chromeos/login/existing_user_controller.h"
12 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 12 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
13 #include "chrome/browser/chromeos/login/session/user_session_manager_test_api.h" 13 #include "chrome/browser/chromeos/login/session/user_session_manager_test_api.h"
14 #include "chrome/browser/chromeos/login/test/https_forwarder.h" 14 #include "chrome/browser/chromeos/login/test/https_forwarder.h"
15 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 15 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
16 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" 16 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h"
17 #include "chrome/browser/lifetime/application_lifetime.h" 17 #include "chrome/browser/lifetime/application_lifetime.h"
18 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" 18 #include "chrome/browser/ui/webui/signin/get_auth_frame.h"
19 #include "chrome/common/chrome_paths.h" 19 #include "chrome/common/chrome_paths.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chromeos/chromeos_switches.h" 21 #include "chromeos/chromeos_switches.h"
22 #include "chromeos/dbus/fake_shill_manager_client.h" 22 #include "chromeos/dbus/fake_shill_manager_client.h"
23 #include "components/policy/core/common/policy_switches.h" 23 #include "components/policy/core/common/policy_switches.h"
24 #include "components/user_manager/fake_user_manager.h" 24 #include "components/user_manager/fake_user_manager.h"
25 #include "content/public/browser/notification_observer.h" 25 #include "content/public/browser/notification_observer.h"
26 #include "content/public/browser/notification_registrar.h" 26 #include "content/public/browser/notification_registrar.h"
27 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
28 #include "content/public/test/browser_test_utils.h" 28 #include "content/public/test/browser_test_utils.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 WizardController* wizard_controller = WizardController::default_controller(); 238 WizardController* wizard_controller = WizardController::default_controller();
239 if (wizard_controller) 239 if (wizard_controller)
240 wizard_controller->SkipToLoginForTesting(LoginScreenContext()); 240 wizard_controller->SkipToLoginForTesting(LoginScreenContext());
241 241
242 WizardController::SkipPostLoginScreensForTesting(); 242 WizardController::SkipPostLoginScreensForTesting();
243 243
244 login_screen_load_observer_->Wait(); 244 login_screen_load_observer_->Wait();
245 } 245 }
246 246
247 void OobeBaseTest::ExecuteJsInSigninFrame(const std::string& js) { 247 void OobeBaseTest::ExecuteJsInSigninFrame(const std::string& js) {
248 content::RenderFrameHost* frame = InlineLoginUI::GetAuthFrame( 248 content::RenderFrameHost* frame =
249 GetLoginUI()->GetWebContents(), GURL(), gaia_frame_parent_); 249 signin::GetAuthFrame(GetLoginUI()->GetWebContents(), gaia_frame_parent_);
250 ASSERT_TRUE(content::ExecuteScript(frame, js)); 250 ASSERT_TRUE(content::ExecuteScript(frame, js));
251 } 251 }
252 252
253 void OobeBaseTest::SetSignFormField(const std::string& field_id, 253 void OobeBaseTest::SetSignFormField(const std::string& field_id,
254 const std::string& field_value) { 254 const std::string& field_value) {
255 std::string js = 255 std::string js =
256 "(function(){" 256 "(function(){"
257 "document.getElementById('$FieldId').value = '$FieldValue';" 257 "document.getElementById('$FieldId').value = '$FieldValue';"
258 "var e = new Event('input');" 258 "var e = new Event('input');"
259 "document.getElementById('$FieldId').dispatchEvent(e);" 259 "document.getElementById('$FieldId').dispatchEvent(e);"
260 "})();"; 260 "})();";
261 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id); 261 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id);
262 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value); 262 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value);
263 ExecuteJsInSigninFrame(js); 263 ExecuteJsInSigninFrame(js);
264 } 264 }
265 265
266 } // namespace chromeos 266 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | chrome/browser/ui/views/profiles/signin_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698