OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/browser/automation/ui_controls.h" | 8 #include "chrome/browser/automation/ui_controls.h" |
9 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 9 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
10 #include "chrome/browser/chromeos/cros/mock_screen_lock_library.h" | 10 #include "chrome/browser/chromeos/cros/mock_screen_lock_library.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, DISABLED_TestFullscreenExit) { | 218 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, DISABLED_TestFullscreenExit) { |
219 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenUnlockRequested()) | 219 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenUnlockRequested()) |
220 .Times(1) | 220 .Times(1) |
221 .RetiresOnSaturation(); | 221 .RetiresOnSaturation(); |
222 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenLockCompleted()) | 222 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenLockCompleted()) |
223 .Times(1) | 223 .Times(1) |
224 .RetiresOnSaturation(); | 224 .RetiresOnSaturation(); |
225 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); | 225 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); |
226 { | 226 { |
227 Waiter waiter(browser()); | 227 Waiter waiter(browser()); |
228 browser()->ToggleFullscreenMode(); | 228 browser()->ToggleFullscreenMode(false); |
229 waiter.Wait(false /* not locked */, true /* full screen */); | 229 waiter.Wait(false /* not locked */, true /* full screen */); |
230 EXPECT_TRUE(browser()->window()->IsFullscreen()); | 230 EXPECT_TRUE(browser()->window()->IsFullscreen()); |
231 EXPECT_FALSE(tester->IsLocked()); | 231 EXPECT_FALSE(tester->IsLocked()); |
232 } | 232 } |
233 { | 233 { |
234 Waiter waiter(browser()); | 234 Waiter waiter(browser()); |
235 UserManager::Get()->UserLoggedIn("user"); | 235 UserManager::Get()->UserLoggedIn("user"); |
236 ScreenLocker::Show(); | 236 ScreenLocker::Show(); |
237 tester->EmulateWindowManagerReady(); | 237 tester->EmulateWindowManagerReady(); |
238 waiter.Wait(true /* locked */, false /* full screen */); | 238 waiter.Wait(true /* locked */, false /* full screen */); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 ui_test_utils::RunAllPendingInMessageLoop(); | 312 ui_test_utils::RunAllPendingInMessageLoop(); |
313 EXPECT_EQ("", tester->GetPassword()); | 313 EXPECT_EQ("", tester->GetPassword()); |
314 | 314 |
315 // Close the locker to match expectations. | 315 // Close the locker to match expectations. |
316 ScreenLocker::Hide(); | 316 ScreenLocker::Hide(); |
317 ui_test_utils::RunAllPendingInMessageLoop(); | 317 ui_test_utils::RunAllPendingInMessageLoop(); |
318 EXPECT_FALSE(tester->IsLocked()); | 318 EXPECT_FALSE(tester->IsLocked()); |
319 } | 319 } |
320 | 320 |
321 } // namespace chromeos | 321 } // namespace chromeos |
OLD | NEW |