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

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

Issue 2429033003: cros: Cleanup lock screen and OOBE C++ backing code. (Closed)
Patch Set: Address comments Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/login_manager_test.h" 10 #include "chrome/browser/chromeos/login/login_manager_test.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 #if defined(MEMORY_SANITIZER) || defined(ADDRESS_SANITIZER) 96 #if defined(MEMORY_SANITIZER) || defined(ADDRESS_SANITIZER)
97 #define MAYBE_ProxyAuthDialogOnUserBoardScreen \ 97 #define MAYBE_ProxyAuthDialogOnUserBoardScreen \
98 DISABLED_ProxyAuthDialogOnUserBoardScreen 98 DISABLED_ProxyAuthDialogOnUserBoardScreen
99 #else 99 #else
100 #define MAYBE_ProxyAuthDialogOnUserBoardScreen ProxyAuthDialogOnUserBoardScreen 100 #define MAYBE_ProxyAuthDialogOnUserBoardScreen ProxyAuthDialogOnUserBoardScreen
101 #endif 101 #endif
102 IN_PROC_BROWSER_TEST_F(ProxyAuthOnUserBoardScreenTest, 102 IN_PROC_BROWSER_TEST_F(ProxyAuthOnUserBoardScreenTest,
103 MAYBE_ProxyAuthDialogOnUserBoardScreen) { 103 MAYBE_ProxyAuthDialogOnUserBoardScreen) {
104 LoginDisplayHost* login_display_host = LoginDisplayHost::default_host(); 104 LoginDisplayHost* login_display_host = LoginDisplayHost::default_host();
105 WebUILoginView* web_ui_login_view = login_display_host->GetWebUILoginView(); 105 WebUILoginView* web_ui_login_view = login_display_host->GetWebUILoginView();
106 OobeUI* oobe_ui = 106 OobeUI* oobe_ui = web_ui_login_view->GetOobeUI();
107 static_cast<OobeUI*>(web_ui_login_view->GetWebUI()->GetController());
108 107
109 { 108 {
110 OobeScreenWaiter screen_waiter(OobeScreen::SCREEN_ACCOUNT_PICKER); 109 OobeScreenWaiter screen_waiter(OobeScreen::SCREEN_ACCOUNT_PICKER);
111 ProxyAuthDialogWaiter auth_dialog_waiter; 110 ProxyAuthDialogWaiter auth_dialog_waiter;
112 screen_waiter.Wait(); 111 screen_waiter.Wait();
113 auth_dialog_waiter.Wait(); 112 auth_dialog_waiter.Wait();
114 113
115 ASSERT_TRUE(auth_dialog_waiter.login_handler()); 114 ASSERT_TRUE(auth_dialog_waiter.login_handler());
116 auth_dialog_waiter.login_handler()->CancelAuth(); 115 auth_dialog_waiter.login_handler()->CancelAuth();
117 } 116 }
118 117
119 { 118 {
120 OobeScreenWaiter screen_waiter(OobeScreen::SCREEN_GAIA_SIGNIN); 119 OobeScreenWaiter screen_waiter(OobeScreen::SCREEN_GAIA_SIGNIN);
121 ProxyAuthDialogWaiter auth_dialog_waiter; 120 ProxyAuthDialogWaiter auth_dialog_waiter;
122 ASSERT_TRUE(content::ExecuteScript(oobe_ui->web_ui()->GetWebContents(), 121 ASSERT_TRUE(content::ExecuteScript(oobe_ui->web_ui()->GetWebContents(),
123 "window.domAutomationController.send(!!(" 122 "window.domAutomationController.send(!!("
124 "$('add-user-button').click()" 123 "$('add-user-button').click()"
125 "));")); 124 "));"));
126 screen_waiter.Wait(); 125 screen_waiter.Wait();
127 auth_dialog_waiter.Wait(); 126 auth_dialog_waiter.Wait();
128 ASSERT_TRUE(auth_dialog_waiter.login_handler()); 127 ASSERT_TRUE(auth_dialog_waiter.login_handler());
129 } 128 }
130 } 129 }
131 130
132 } // namespace chromeos 131 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/webui_screen_locker.cc ('k') | chrome/browser/chromeos/login/signin_screen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698