| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 #include "chrome/browser/automation/ui_controls.h" | 8 #include "chrome/browser/automation/ui_controls.h" |
| 9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 void MouseClick(views::Widget* widget) { | 239 void MouseClick(views::Widget* widget) { |
| 240 ui_controls::SendMouseClick(ui_controls::RIGHT); | 240 ui_controls::SendMouseClick(ui_controls::RIGHT); |
| 241 } | 241 } |
| 242 | 242 |
| 243 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestNoPasswordWithMouseClick) { | 243 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestNoPasswordWithMouseClick) { |
| 244 TestNoPassword(MouseClick); | 244 TestNoPassword(MouseClick); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void KeyPress(views::Widget* widget) { | 247 void KeyPress(views::Widget* widget) { |
| 248 ui_controls::SendKeyPress(GTK_WINDOW(widget->GetNativeView()), | 248 ui_controls::SendKeyPress(GTK_WINDOW(widget->GetNativeView()), |
| 249 base::VKEY_SPACE, false, false, false, false); | 249 app::VKEY_SPACE, false, false, false, false); |
| 250 } | 250 } |
| 251 | 251 |
| 252 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestNoPasswordWithKeyPress) { | 252 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestNoPasswordWithKeyPress) { |
| 253 TestNoPassword(KeyPress); | 253 TestNoPassword(KeyPress); |
| 254 } | 254 } |
| 255 | 255 |
| 256 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestShowTwice) { | 256 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestShowTwice) { |
| 257 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenLockCompleted()) | 257 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenLockCompleted()) |
| 258 .Times(2) | 258 .Times(2) |
| 259 .RetiresOnSaturation(); | 259 .RetiresOnSaturation(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 270 ScreenLocker::Show(); | 270 ScreenLocker::Show(); |
| 271 EXPECT_TRUE(tester->IsLocked()); | 271 EXPECT_TRUE(tester->IsLocked()); |
| 272 | 272 |
| 273 // Close the locker to match expectations. | 273 // Close the locker to match expectations. |
| 274 ScreenLocker::Hide(); | 274 ScreenLocker::Hide(); |
| 275 ui_test_utils::RunAllPendingInMessageLoop(); | 275 ui_test_utils::RunAllPendingInMessageLoop(); |
| 276 EXPECT_FALSE(tester->IsLocked()); | 276 EXPECT_FALSE(tester->IsLocked()); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace chromeos | 279 } // namespace chromeos |
| OLD | NEW |