| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_TESTER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_TESTER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 | |
| 12 namespace views { | |
| 13 class Widget; | |
| 14 } // namespace views | |
| 15 | |
| 16 namespace chromeos { | |
| 17 | |
| 18 namespace test { | |
| 19 | |
| 20 // ScreenLockerTester provides access to the private state/function | |
| 21 // of ScreenLocker class. Used to implement unit tests. | |
| 22 class ScreenLockerTester { | |
| 23 public: | |
| 24 ScreenLockerTester(); | |
| 25 virtual ~ScreenLockerTester(); | |
| 26 | |
| 27 // Returns true if the screen is locked. | |
| 28 virtual bool IsLocked(); | |
| 29 | |
| 30 // Injects MockAuthenticate that uses given |user| and |password|. | |
| 31 virtual void InjectMockAuthenticator(const std::string& user, | |
| 32 const std::string& password); | |
| 33 | |
| 34 // Sets the password text. | |
| 35 virtual void SetPassword(const std::string& password) = 0; | |
| 36 | |
| 37 // Gets the password text. | |
| 38 virtual std::string GetPassword() = 0; | |
| 39 | |
| 40 // Emulates entring a password. | |
| 41 virtual void EnterPassword(const std::string& password) = 0; | |
| 42 | |
| 43 // Emulates the ready message from window manager. | |
| 44 virtual void EmulateWindowManagerReady() = 0; | |
| 45 | |
| 46 // Returns the widget for screen locker window. | |
| 47 virtual views::Widget* GetWidget() const = 0; | |
| 48 | |
| 49 virtual views::Widget* GetChildWidget() const = 0; | |
| 50 }; | |
| 51 | |
| 52 } // namespace test | |
| 53 | |
| 54 } // namespace chromeos | |
| 55 | |
| 56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_TESTER_H_ | |
| OLD | NEW |