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

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

Issue 3337006: Revert 58388 - Revert 58215 - Revert 58186 - Move the keyboard files from bas... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/chromeos/login/account_screen.h" 7 #include "chrome/browser/chromeos/login/account_screen.h"
8 #include "chrome/browser/chromeos/login/eula_view.h" 8 #include "chrome/browser/chromeos/login/eula_view.h"
9 #include "chrome/browser/chromeos/login/language_switch_menu.h" 9 #include "chrome/browser/chromeos/login/language_switch_menu.h"
10 #include "chrome/browser/chromeos/login/login_screen.h" 10 #include "chrome/browser/chromeos/login/login_screen.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); 196 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1);
197 controller()->OnExit(chromeos::ScreenObserver::NETWORK_OFFLINE); 197 controller()->OnExit(chromeos::ScreenObserver::NETWORK_OFFLINE);
198 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen()); 198 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen());
199 } 199 }
200 200
201 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, Accelerators) { 201 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, Accelerators) {
202 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); 202 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen());
203 203
204 views::FocusManager* focus_manager = 204 views::FocusManager* focus_manager =
205 controller()->contents()->GetFocusManager(); 205 controller()->contents()->GetFocusManager();
206 views::Accelerator accel_account_screen(app::VKEY_A, false, true, true); 206 views::Accelerator accel_account_screen(base::VKEY_A, false, true, true);
207 views::Accelerator accel_login_screen(app::VKEY_L, false, true, true); 207 views::Accelerator accel_login_screen(base::VKEY_L, false, true, true);
208 views::Accelerator accel_network_screen(app::VKEY_N, false, true, true); 208 views::Accelerator accel_network_screen(base::VKEY_N, false, true, true);
209 views::Accelerator accel_update_screen(app::VKEY_U, false, true, true); 209 views::Accelerator accel_update_screen(base::VKEY_U, false, true, true);
210 views::Accelerator accel_image_screen(app::VKEY_I, false, true, true); 210 views::Accelerator accel_image_screen(base::VKEY_I, false, true, true);
211 views::Accelerator accel_eula_screen(app::VKEY_E, false, true, true); 211 views::Accelerator accel_eula_screen(base::VKEY_E, false, true, true);
212 212
213 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); 213 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1);
214 EXPECT_CALL(*mock_account_screen_, Show()).Times(1); 214 EXPECT_CALL(*mock_account_screen_, Show()).Times(1);
215 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_account_screen)); 215 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_account_screen));
216 EXPECT_EQ(controller()->GetAccountScreen(), controller()->current_screen()); 216 EXPECT_EQ(controller()->GetAccountScreen(), controller()->current_screen());
217 217
218 EXPECT_CALL(*mock_account_screen_, Hide()).Times(1); 218 EXPECT_CALL(*mock_account_screen_, Hide()).Times(1);
219 EXPECT_CALL(*mock_login_screen_, Show()).Times(1); 219 EXPECT_CALL(*mock_login_screen_, Show()).Times(1);
220 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_login_screen)); 220 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_login_screen));
221 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen()); 221 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen());
(...skipping 12 matching lines...) Expand all
234 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_image_screen)); 234 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_image_screen));
235 EXPECT_EQ(controller()->GetUserImageScreen(), controller()->current_screen()); 235 EXPECT_EQ(controller()->GetUserImageScreen(), controller()->current_screen());
236 236
237 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); 237 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1);
238 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_eula_screen)); 238 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_eula_screen));
239 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); 239 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen());
240 } 240 }
241 241
242 COMPILE_ASSERT(chromeos::ScreenObserver::EXIT_CODES_COUNT == 17, 242 COMPILE_ASSERT(chromeos::ScreenObserver::EXIT_CODES_COUNT == 17,
243 add_tests_for_new_control_flow_you_just_introduced); 243 add_tests_for_new_control_flow_you_just_introduced);
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/cocoa/html_dialog_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698