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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
7 #include "chrome/browser/automation/ui_controls.h" | 7 #include "chrome/browser/automation/ui_controls.h" |
8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
10 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenLockCompleted()) | 236 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenLockCompleted()) |
237 .Times(2) | 237 .Times(2) |
238 .RetiresOnSaturation(); | 238 .RetiresOnSaturation(); |
239 | 239 |
240 UserManager::Get()->UserLoggedIn("user"); | 240 UserManager::Get()->UserLoggedIn("user"); |
241 ScreenLocker::Show(); | 241 ScreenLocker::Show(); |
242 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); | 242 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); |
243 tester->EmulateWindowManagerReady(); | 243 tester->EmulateWindowManagerReady(); |
244 ui_test_utils::WaitForNotification( | 244 ui_test_utils::WaitForNotification( |
245 NotificationType::SCREEN_LOCK_STATE_CHANGED); | 245 NotificationType::SCREEN_LOCK_STATE_CHANGED); |
246 EXPECT_TRUE(tester->IsOpen()); | 246 EXPECT_TRUE(tester->IsLocked()); |
247 | 247 |
248 // Calling Show again simply send LockCompleted signal. | 248 // Calling Show again simply send LockCompleted signal. |
249 ScreenLocker::Show(); | 249 ScreenLocker::Show(); |
250 EXPECT_TRUE(tester->IsOpen()); | 250 EXPECT_TRUE(tester->IsLocked()); |
251 | 251 |
252 // Close the locker to match expectations. | 252 // Close the locker to match expectations. |
253 ScreenLocker::Hide(); | 253 ScreenLocker::Hide(); |
254 ui_test_utils::RunAllPendingInMessageLoop(); | 254 ui_test_utils::RunAllPendingInMessageLoop(); |
255 EXPECT_FALSE(tester->IsOpen()); | 255 EXPECT_FALSE(tester->IsLocked()); |
256 } | 256 } |
257 | 257 |
258 } // namespace chromeos | 258 } // namespace chromeos |
OLD | NEW |