ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / chrome / browser / chromeos / login / lock / screen_locker_tester.h
bloba6e4014aa04752458b2d6495d828a323921f79d9
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_
8 #include <string>
10 #include "base/basictypes.h"
12 namespace views {
13 class Widget;
14 } // namespace views
16 namespace chromeos {
18 class UserContext;
20 namespace test {
22 // ScreenLockerTester provides access to the private state/function
23 // of ScreenLocker class. Used to implement unit tests.
24 class ScreenLockerTester {
25 public:
26 ScreenLockerTester();
27 virtual ~ScreenLockerTester();
29 // Returns true if the screen is locked.
30 virtual bool IsLocked();
32 // Injects StubAuthenticator that uses the credentials in |user_context|.
33 virtual void InjectStubUserContext(const UserContext& user_context);
35 // Sets the password text.
36 virtual void SetPassword(const std::string& password) = 0;
38 // Gets the password text.
39 virtual std::string GetPassword() = 0;
41 // Emulates entring a password.
42 virtual void EnterPassword(const std::string& password) = 0;
44 // Emulates the ready message from window manager.
45 virtual void EmulateWindowManagerReady() = 0;
47 // Returns the widget for screen locker window.
48 virtual views::Widget* GetWidget() const = 0;
50 virtual views::Widget* GetChildWidget() const = 0;
53 } // namespace test
55 } // namespace chromeos
57 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_