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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // ScreenLockerTester provides access to the private state/function | 22 // ScreenLockerTester provides access to the private state/function |
23 // of ScreenLocker class. Used to implement unit tests. | 23 // of ScreenLocker class. Used to implement unit tests. |
24 class ScreenLockerTester { | 24 class ScreenLockerTester { |
25 public: | 25 public: |
26 ScreenLockerTester(); | 26 ScreenLockerTester(); |
27 virtual ~ScreenLockerTester(); | 27 virtual ~ScreenLockerTester(); |
28 | 28 |
29 // Returns true if the screen is locked. | 29 // Returns true if the screen is locked. |
30 virtual bool IsLocked(); | 30 virtual bool IsLocked(); |
31 | 31 |
32 // Injects MockAuthenticator that uses the credentials in |user_context|. | 32 // Injects StubAuthenticator that uses the credentials in |user_context|. |
33 virtual void InjectMockAuthenticator(const UserContext& user_context); | 33 virtual void InjectStubUserContext(const UserContext& user_context); |
34 | 34 |
35 // Sets the password text. | 35 // Sets the password text. |
36 virtual void SetPassword(const std::string& password) = 0; | 36 virtual void SetPassword(const std::string& password) = 0; |
37 | 37 |
38 // Gets the password text. | 38 // Gets the password text. |
39 virtual std::string GetPassword() = 0; | 39 virtual std::string GetPassword() = 0; |
40 | 40 |
41 // Emulates entring a password. | 41 // Emulates entring a password. |
42 virtual void EnterPassword(const std::string& password) = 0; | 42 virtual void EnterPassword(const std::string& password) = 0; |
43 | 43 |
44 // Emulates the ready message from window manager. | 44 // Emulates the ready message from window manager. |
45 virtual void EmulateWindowManagerReady() = 0; | 45 virtual void EmulateWindowManagerReady() = 0; |
46 | 46 |
47 // Returns the widget for screen locker window. | 47 // Returns the widget for screen locker window. |
48 virtual views::Widget* GetWidget() const = 0; | 48 virtual views::Widget* GetWidget() const = 0; |
49 | 49 |
50 virtual views::Widget* GetChildWidget() const = 0; | 50 virtual views::Widget* GetChildWidget() const = 0; |
51 }; | 51 }; |
52 | 52 |
53 } // namespace test | 53 } // namespace test |
54 | 54 |
55 } // namespace chromeos | 55 } // namespace chromeos |
56 | 56 |
57 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_ |
OLD | NEW |