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 "ash/wm/window_state.h" | 7 #include "ash/wm/window_state.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 EXPECT_FALSE(browser_window->IsFullscreen()); | 214 EXPECT_FALSE(browser_window->IsFullscreen()); |
215 } | 215 } |
216 | 216 |
217 // 2) If the active browser window is in fullscreen and the fullscreen window | 217 // 2) If the active browser window is in fullscreen and the fullscreen window |
218 // has all of the pixels, locking the screen should exit fullscreen. The | 218 // has all of the pixels, locking the screen should exit fullscreen. The |
219 // fullscreen window has all of the pixels when in tab fullscreen. | 219 // fullscreen window has all of the pixels when in tab fullscreen. |
220 { | 220 { |
221 Waiter waiter(browser()); | 221 Waiter waiter(browser()); |
222 content::WebContents* web_contents = | 222 content::WebContents* web_contents = |
223 browser()->tab_strip_model()->GetActiveWebContents(); | 223 browser()->tab_strip_model()->GetActiveWebContents(); |
224 browser()->fullscreen_controller()->ToggleFullscreenModeForTab( | 224 browser()->fullscreen_controller()->EnterFullscreenModeForTab( |
225 web_contents, true); | 225 web_contents, GURL()); |
226 waiter.Wait(false /* not locked */, true /* fullscreen */); | 226 waiter.Wait(false /* not locked */, true /* fullscreen */); |
227 EXPECT_TRUE(browser_window->IsFullscreen()); | 227 EXPECT_TRUE(browser_window->IsFullscreen()); |
228 EXPECT_TRUE(window_state->hide_shelf_when_fullscreen()); | 228 EXPECT_TRUE(window_state->hide_shelf_when_fullscreen()); |
229 EXPECT_FALSE(tester->IsLocked()); | 229 EXPECT_FALSE(tester->IsLocked()); |
230 } | 230 } |
231 { | 231 { |
232 Waiter waiter(browser()); | 232 Waiter waiter(browser()); |
233 ScreenLocker::Show(); | 233 ScreenLocker::Show(); |
234 tester->EmulateWindowManagerReady(); | 234 tester->EmulateWindowManagerReady(); |
235 waiter.Wait(true /* locked */, false /* full screen */); | 235 waiter.Wait(true /* locked */, false /* full screen */); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 EXPECT_EQ("", tester->GetPassword()); | 295 EXPECT_EQ("", tester->GetPassword()); |
296 | 296 |
297 // Close the locker to match expectations. | 297 // Close the locker to match expectations. |
298 ScreenLocker::Hide(); | 298 ScreenLocker::Hide(); |
299 content::RunAllPendingInMessageLoop(); | 299 content::RunAllPendingInMessageLoop(); |
300 EXPECT_FALSE(tester->IsLocked()); | 300 EXPECT_FALSE(tester->IsLocked()); |
301 EXPECT_TRUE(VerifyLockScreenDismissed()); | 301 EXPECT_TRUE(VerifyLockScreenDismissed()); |
302 } | 302 } |
303 | 303 |
304 } // namespace chromeos | 304 } // namespace chromeos |
OLD | NEW |