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_
10 #include "base/basictypes.h"
22 // ScreenLockerTester provides access to the private state/function
23 // of ScreenLocker class. Used to implement unit tests.
24 class 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;
55 } // namespace chromeos
57 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_