OLD | NEW |
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/existing_user_controller.h" |
9 #include "chrome/browser/chromeos/login/language_switch_menu.h" | 10 #include "chrome/browser/chromeos/login/language_switch_menu.h" |
10 #include "chrome/browser/chromeos/login/login_screen.h" | |
11 #include "chrome/browser/chromeos/login/mock_update_screen.h" | 11 #include "chrome/browser/chromeos/login/mock_update_screen.h" |
12 #include "chrome/browser/chromeos/login/network_screen.h" | 12 #include "chrome/browser/chromeos/login/network_screen.h" |
13 #include "chrome/browser/chromeos/login/network_selection_view.h" | 13 #include "chrome/browser/chromeos/login/network_selection_view.h" |
14 #include "chrome/browser/chromeos/login/user_image_screen.h" | 14 #include "chrome/browser/chromeos/login/user_image_screen.h" |
15 #include "chrome/browser/chromeos/login/wizard_controller.h" | 15 #include "chrome/browser/chromeos/login/wizard_controller.h" |
16 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h" | 16 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/common/notification_service.h" | 18 #include "chrome/common/notification_service.h" |
19 #include "chrome/test/ui_test_utils.h" | 19 #include "chrome/test/ui_test_utils.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
(...skipping 24 matching lines...) Expand all Loading... |
45 } | 45 } |
46 | 46 |
47 template <> MockOutShowHide<chromeos::NetworkScreen>* | 47 template <> MockOutShowHide<chromeos::NetworkScreen>* |
48 CreateMockWizardScreenHelper<chromeos::NetworkScreen>::Create( | 48 CreateMockWizardScreenHelper<chromeos::NetworkScreen>::Create( |
49 WizardController* wizard) { | 49 WizardController* wizard) { |
50 return new MockOutShowHide<chromeos::NetworkScreen>(wizard); | 50 return new MockOutShowHide<chromeos::NetworkScreen>(wizard); |
51 } | 51 } |
52 | 52 |
53 #define MOCK(mock_var, screen_name, mocked_class) \ | 53 #define MOCK(mock_var, screen_name, mocked_class) \ |
54 mock_var = CreateMockWizardScreenHelper<mocked_class>::Create(controller()); \ | 54 mock_var = CreateMockWizardScreenHelper<mocked_class>::Create(controller()); \ |
55 controller()->screen_name.reset(mock_var); \ | 55 controller()->screen_name.reset(mock_var); |
56 EXPECT_CALL(*mock_var, Show()).Times(0); \ | |
57 EXPECT_CALL(*mock_var, Hide()).Times(0); | |
58 | 56 |
59 } // namespace | 57 } // namespace |
60 | 58 |
| 59 using chromeos::ExistingUserController; |
| 60 |
61 class WizardControllerTest : public chromeos::WizardInProcessBrowserTest { | 61 class WizardControllerTest : public chromeos::WizardInProcessBrowserTest { |
62 protected: | 62 protected: |
63 WizardControllerTest() : chromeos::WizardInProcessBrowserTest( | 63 WizardControllerTest() : chromeos::WizardInProcessBrowserTest( |
64 WizardController::kTestNoScreenName) {} | 64 WizardController::kTestNoScreenName) {} |
65 virtual ~WizardControllerTest() {} | 65 virtual ~WizardControllerTest() {} |
66 | 66 |
67 private: | 67 private: |
68 DISALLOW_COPY_AND_ASSIGN(WizardControllerTest); | 68 DISALLOW_COPY_AND_ASSIGN(WizardControllerTest); |
69 }; | 69 }; |
70 | 70 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 WizardControllerFlowTest() {} | 105 WizardControllerFlowTest() {} |
106 // Overriden from InProcessBrowserTest: | 106 // Overriden from InProcessBrowserTest: |
107 virtual Browser* CreateBrowser(Profile* profile) { | 107 virtual Browser* CreateBrowser(Profile* profile) { |
108 Browser* ret = WizardControllerTest::CreateBrowser(profile); | 108 Browser* ret = WizardControllerTest::CreateBrowser(profile); |
109 | 109 |
110 // Make sure that OOBE is run as an "official" build. | 110 // Make sure that OOBE is run as an "official" build. |
111 WizardController::default_controller()->is_official_build_ = true; | 111 WizardController::default_controller()->is_official_build_ = true; |
112 | 112 |
113 // Set up the mocks for all screens. | 113 // Set up the mocks for all screens. |
114 MOCK(mock_account_screen_, account_screen_, chromeos::AccountScreen); | 114 MOCK(mock_account_screen_, account_screen_, chromeos::AccountScreen); |
115 MOCK(mock_login_screen_, login_screen_, chromeos::LoginScreen); | 115 EXPECT_CALL(*mock_account_screen_, Show()).Times(0); |
| 116 EXPECT_CALL(*mock_account_screen_, Hide()).Times(0); |
116 MOCK(mock_network_screen_, network_screen_, chromeos::NetworkScreen); | 117 MOCK(mock_network_screen_, network_screen_, chromeos::NetworkScreen); |
| 118 EXPECT_CALL(*mock_network_screen_, Show()).Times(0); |
| 119 EXPECT_CALL(*mock_network_screen_, Hide()).Times(0); |
117 MOCK(mock_update_screen_, update_screen_, MockUpdateScreen); | 120 MOCK(mock_update_screen_, update_screen_, MockUpdateScreen); |
| 121 EXPECT_CALL(*mock_update_screen_, Show()).Times(0); |
| 122 EXPECT_CALL(*mock_update_screen_, Hide()).Times(0); |
118 MOCK(mock_eula_screen_, eula_screen_, chromeos::EulaScreen); | 123 MOCK(mock_eula_screen_, eula_screen_, chromeos::EulaScreen); |
| 124 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); |
| 125 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(0); |
119 | 126 |
120 // Switch to the initial screen. | 127 // Switch to the initial screen. |
121 EXPECT_EQ(NULL, controller()->current_screen()); | 128 EXPECT_EQ(NULL, controller()->current_screen()); |
122 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); | 129 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); |
123 controller()->ShowFirstScreen(WizardController::kNetworkScreenName); | 130 controller()->ShowFirstScreen(WizardController::kNetworkScreenName); |
124 | 131 |
125 return ret; | 132 return ret; |
126 } | 133 } |
127 | 134 |
128 MockOutShowHide<chromeos::AccountScreen>* mock_account_screen_; | 135 MockOutShowHide<chromeos::AccountScreen>* mock_account_screen_; |
129 MockOutShowHide<chromeos::LoginScreen>* mock_login_screen_; | |
130 MockOutShowHide<chromeos::NetworkScreen>* mock_network_screen_; | 136 MockOutShowHide<chromeos::NetworkScreen>* mock_network_screen_; |
131 MockOutShowHide<MockUpdateScreen>* mock_update_screen_; | 137 MockOutShowHide<MockUpdateScreen>* mock_update_screen_; |
132 MockOutShowHide<chromeos::EulaScreen>* mock_eula_screen_; | 138 MockOutShowHide<chromeos::EulaScreen>* mock_eula_screen_; |
133 | 139 |
134 private: | 140 private: |
135 DISALLOW_COPY_AND_ASSIGN(WizardControllerFlowTest); | 141 DISALLOW_COPY_AND_ASSIGN(WizardControllerFlowTest); |
136 }; | 142 }; |
137 | 143 |
138 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowMain) { | 144 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowMain) { |
| 145 EXPECT_TRUE(ExistingUserController::current_controller() == NULL); |
139 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); | 146 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); |
140 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); | 147 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); |
141 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); | 148 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); |
142 controller()->OnExit(chromeos::ScreenObserver::NETWORK_CONNECTED); | 149 controller()->OnExit(chromeos::ScreenObserver::NETWORK_CONNECTED); |
143 | 150 |
144 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); | 151 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); |
145 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(1); | 152 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(1); |
146 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(1); | 153 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(1); |
147 EXPECT_CALL(*mock_update_screen_, Show()).Times(1); | 154 EXPECT_CALL(*mock_update_screen_, Show()).Times(1); |
148 controller()->OnExit(chromeos::ScreenObserver::EULA_ACCEPTED); | 155 controller()->OnExit(chromeos::ScreenObserver::EULA_ACCEPTED); |
149 | 156 |
150 EXPECT_EQ(controller()->GetUpdateScreen(), controller()->current_screen()); | 157 EXPECT_EQ(controller()->GetUpdateScreen(), controller()->current_screen()); |
151 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1); | 158 EXPECT_CALL(*mock_update_screen_, Hide()).Times(0); |
152 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); | 159 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); |
153 EXPECT_CALL(*mock_login_screen_, Show()).Times(1); | |
154 controller()->OnExit(chromeos::ScreenObserver::UPDATE_INSTALLED); | 160 controller()->OnExit(chromeos::ScreenObserver::UPDATE_INSTALLED); |
155 | 161 |
156 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen()); | 162 EXPECT_FALSE(ExistingUserController::current_controller() == NULL); |
157 EXPECT_CALL(*mock_login_screen_, Hide()).Times(1); | 163 set_controller(NULL); |
158 EXPECT_CALL(*mock_account_screen_, Show()).Times(1); | |
159 controller()->OnExit(chromeos::ScreenObserver::LOGIN_CREATE_ACCOUNT); | |
160 | |
161 EXPECT_EQ(controller()->GetAccountScreen(), controller()->current_screen()); | |
162 EXPECT_CALL(*mock_account_screen_, Hide()).Times(1); | |
163 EXPECT_CALL(*mock_login_screen_, Show()).Times(1); | |
164 EXPECT_CALL(*mock_login_screen_, Hide()).Times(0); // last transition | |
165 controller()->OnExit(chromeos::ScreenObserver::ACCOUNT_CREATED); | |
166 | |
167 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen()); | |
168 } | 164 } |
169 | 165 |
170 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowErrorUpdate) { | 166 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowErrorUpdate) { |
171 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); | 167 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); |
172 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(0); | 168 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(0); |
173 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); | 169 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); |
174 EXPECT_CALL(*mock_update_screen_, Show()).Times(0); | 170 EXPECT_CALL(*mock_update_screen_, Show()).Times(0); |
175 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); | 171 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); |
176 controller()->OnExit(chromeos::ScreenObserver::NETWORK_CONNECTED); | 172 controller()->OnExit(chromeos::ScreenObserver::NETWORK_CONNECTED); |
177 | 173 |
178 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); | 174 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); |
179 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(1); | 175 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(1); |
180 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(1); | 176 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(1); |
181 EXPECT_CALL(*mock_update_screen_, Show()).Times(1); | 177 EXPECT_CALL(*mock_update_screen_, Show()).Times(1); |
182 controller()->OnExit(chromeos::ScreenObserver::EULA_ACCEPTED); | 178 controller()->OnExit(chromeos::ScreenObserver::EULA_ACCEPTED); |
183 | 179 |
184 EXPECT_EQ(controller()->GetUpdateScreen(), controller()->current_screen()); | 180 EXPECT_EQ(controller()->GetUpdateScreen(), controller()->current_screen()); |
185 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1); | 181 EXPECT_CALL(*mock_update_screen_, Hide()).Times(0); |
186 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); | 182 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); |
187 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(0); // last transition | 183 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(0); // last transition |
188 EXPECT_CALL(*mock_login_screen_, Show()).Times(1); | |
189 controller()->OnExit( | 184 controller()->OnExit( |
190 chromeos::ScreenObserver::UPDATE_ERROR_UPDATING); | 185 chromeos::ScreenObserver::UPDATE_ERROR_UPDATING); |
191 | 186 |
192 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen()); | 187 EXPECT_FALSE(ExistingUserController::current_controller() == NULL); |
| 188 set_controller(NULL); |
193 } | 189 } |
194 | 190 |
195 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowEulaDeclined) { | 191 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowEulaDeclined) { |
196 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); | 192 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); |
197 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(0); | 193 EXPECT_CALL(*mock_update_screen_, StartUpdate()).Times(0); |
198 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); | 194 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); |
199 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); | 195 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); |
200 controller()->OnExit(chromeos::ScreenObserver::NETWORK_CONNECTED); | 196 controller()->OnExit(chromeos::ScreenObserver::NETWORK_CONNECTED); |
201 | 197 |
202 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); | 198 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); |
203 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(1); | 199 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(1); |
204 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); | 200 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); |
205 EXPECT_CALL(*mock_network_screen_, Hide()).Times(0); // last transition | 201 EXPECT_CALL(*mock_network_screen_, Hide()).Times(0); // last transition |
206 controller()->OnExit(chromeos::ScreenObserver::EULA_BACK); | 202 controller()->OnExit(chromeos::ScreenObserver::EULA_BACK); |
207 | 203 |
208 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); | 204 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); |
209 } | 205 } |
210 | 206 |
211 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowErrorNetwork) { | 207 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowErrorNetwork) { |
212 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); | 208 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); |
213 EXPECT_CALL(*mock_login_screen_, Show()).Times(1); | |
214 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); | |
215 controller()->OnExit(chromeos::ScreenObserver::NETWORK_OFFLINE); | 209 controller()->OnExit(chromeos::ScreenObserver::NETWORK_OFFLINE); |
216 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen()); | 210 |
| 211 EXPECT_FALSE(ExistingUserController::current_controller() == NULL); |
| 212 set_controller(NULL); |
217 } | 213 } |
218 | 214 |
219 #if defined(OFFICIAL_BUILD) | 215 #if defined(OFFICIAL_BUILD) |
220 // This test is supposed to fail on official test. | 216 // This test is supposed to fail on official build. |
221 #define MAYBE_Accelerators DISABLED_Accelerators | 217 #define MAYBE_Accelerators DISABLED_Accelerators |
222 #else | 218 #else |
223 #define MAYBE_Accelerators Accelerators | 219 #define MAYBE_Accelerators Accelerators |
224 #endif | 220 #endif |
225 | 221 |
226 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, MAYBE_Accelerators) { | 222 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, MAYBE_Accelerators) { |
227 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); | 223 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); |
228 | 224 |
229 views::FocusManager* focus_manager = | 225 views::FocusManager* focus_manager = |
230 controller()->contents()->GetFocusManager(); | 226 controller()->contents()->GetFocusManager(); |
231 views::Accelerator accel_account_screen(app::VKEY_A, false, true, true); | 227 views::Accelerator accel_account_screen(app::VKEY_A, false, true, true); |
232 views::Accelerator accel_login_screen(app::VKEY_L, false, true, true); | |
233 views::Accelerator accel_network_screen(app::VKEY_N, false, true, true); | 228 views::Accelerator accel_network_screen(app::VKEY_N, false, true, true); |
234 views::Accelerator accel_update_screen(app::VKEY_U, false, true, true); | 229 views::Accelerator accel_update_screen(app::VKEY_U, false, true, true); |
235 views::Accelerator accel_image_screen(app::VKEY_I, false, true, true); | 230 views::Accelerator accel_image_screen(app::VKEY_I, false, true, true); |
236 views::Accelerator accel_eula_screen(app::VKEY_E, false, true, true); | 231 views::Accelerator accel_eula_screen(app::VKEY_E, false, true, true); |
237 | 232 |
238 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); | 233 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); |
239 EXPECT_CALL(*mock_account_screen_, Show()).Times(1); | 234 EXPECT_CALL(*mock_account_screen_, Show()).Times(1); |
240 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_account_screen)); | 235 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_account_screen)); |
241 EXPECT_EQ(controller()->GetAccountScreen(), controller()->current_screen()); | 236 EXPECT_EQ(controller()->GetAccountScreen(), controller()->current_screen()); |
242 | 237 |
243 focus_manager = controller()->contents()->GetFocusManager(); | 238 focus_manager = controller()->contents()->GetFocusManager(); |
244 EXPECT_CALL(*mock_account_screen_, Hide()).Times(1); | 239 EXPECT_CALL(*mock_account_screen_, Hide()).Times(1); |
245 EXPECT_CALL(*mock_login_screen_, Show()).Times(1); | |
246 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_login_screen)); | |
247 EXPECT_EQ(controller()->GetLoginScreen(), controller()->current_screen()); | |
248 | |
249 focus_manager = controller()->contents()->GetFocusManager(); | |
250 EXPECT_CALL(*mock_login_screen_, Hide()).Times(1); | |
251 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); | 240 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); |
252 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_network_screen)); | 241 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_network_screen)); |
253 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); | 242 EXPECT_EQ(controller()->GetNetworkScreen(), controller()->current_screen()); |
254 | 243 |
255 focus_manager = controller()->contents()->GetFocusManager(); | 244 focus_manager = controller()->contents()->GetFocusManager(); |
256 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); | 245 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); |
257 EXPECT_CALL(*mock_update_screen_, Show()).Times(1); | 246 EXPECT_CALL(*mock_update_screen_, Show()).Times(1); |
258 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_update_screen)); | 247 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_update_screen)); |
259 EXPECT_EQ(controller()->GetUpdateScreen(), controller()->current_screen()); | 248 EXPECT_EQ(controller()->GetUpdateScreen(), controller()->current_screen()); |
260 | 249 |
261 focus_manager = controller()->contents()->GetFocusManager(); | 250 focus_manager = controller()->contents()->GetFocusManager(); |
262 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1); | 251 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1); |
263 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_image_screen)); | 252 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_image_screen)); |
264 EXPECT_EQ(controller()->GetUserImageScreen(), controller()->current_screen()); | 253 EXPECT_EQ(controller()->GetUserImageScreen(), controller()->current_screen()); |
265 | 254 |
266 focus_manager = controller()->contents()->GetFocusManager(); | 255 focus_manager = controller()->contents()->GetFocusManager(); |
267 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); | 256 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); |
268 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_eula_screen)); | 257 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_eula_screen)); |
269 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); | 258 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); |
270 } | 259 } |
271 | 260 |
272 COMPILE_ASSERT(chromeos::ScreenObserver::EXIT_CODES_COUNT == 18, | 261 COMPILE_ASSERT(chromeos::ScreenObserver::EXIT_CODES_COUNT == 15, |
273 add_tests_for_new_control_flow_you_just_introduced); | 262 add_tests_for_new_control_flow_you_just_introduced); |
OLD | NEW |