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/lock/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "ash/common/wm/window_state.h" | 9 #include "ash/common/wm/window_state.h" |
10 #include "ash/wm/window_state_aura.h" | 10 #include "ash/wm/window_state_aura.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 { | 229 { |
230 Waiter waiter(browser()); | 230 Waiter waiter(browser()); |
231 browser() | 231 browser() |
232 ->exclusive_access_manager() | 232 ->exclusive_access_manager() |
233 ->fullscreen_controller() | 233 ->fullscreen_controller() |
234 ->ToggleBrowserFullscreenMode(); | 234 ->ToggleBrowserFullscreenMode(); |
235 waiter.Wait(false /* not locked */, false /* fullscreen */); | 235 waiter.Wait(false /* not locked */, false /* fullscreen */); |
236 EXPECT_FALSE(browser_window->IsFullscreen()); | 236 EXPECT_FALSE(browser_window->IsFullscreen()); |
237 } | 237 } |
238 | 238 |
| 239 // Browser window should be activated after screen locker is gone. Otherwise, |
| 240 // the rest of the test would fail. |
| 241 ASSERT_EQ(window_state, ash::wm::GetActiveWindowState()); |
| 242 |
239 // 2) If the active browser window is in fullscreen and the fullscreen window | 243 // 2) If the active browser window is in fullscreen and the fullscreen window |
240 // has all of the pixels, locking the screen should exit fullscreen. The | 244 // has all of the pixels, locking the screen should exit fullscreen. The |
241 // fullscreen window has all of the pixels when in tab fullscreen. | 245 // fullscreen window has all of the pixels when in tab fullscreen. |
242 { | 246 { |
243 Waiter waiter(browser()); | 247 Waiter waiter(browser()); |
244 content::WebContents* web_contents = | 248 content::WebContents* web_contents = |
245 browser()->tab_strip_model()->GetActiveWebContents(); | 249 browser()->tab_strip_model()->GetActiveWebContents(); |
246 browser() | 250 browser() |
247 ->exclusive_access_manager() | 251 ->exclusive_access_manager() |
248 ->fullscreen_controller() | 252 ->fullscreen_controller() |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 EXPECT_EQ("", tester->GetPassword()); | 323 EXPECT_EQ("", tester->GetPassword()); |
320 | 324 |
321 // Close the locker to match expectations. | 325 // Close the locker to match expectations. |
322 ScreenLocker::Hide(); | 326 ScreenLocker::Hide(); |
323 content::RunAllPendingInMessageLoop(); | 327 content::RunAllPendingInMessageLoop(); |
324 EXPECT_FALSE(tester->IsLocked()); | 328 EXPECT_FALSE(tester->IsLocked()); |
325 EXPECT_TRUE(VerifyLockScreenDismissed()); | 329 EXPECT_TRUE(VerifyLockScreenDismissed()); |
326 } | 330 } |
327 | 331 |
328 } // namespace chromeos | 332 } // namespace chromeos |
OLD | NEW |