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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_TESTER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_TESTER_H_
10 #include "base/basictypes.h"
20 // ScreenLockerTester provides access to the private state/function
21 // of ScreenLocker class. Used to implement unit tests.
22 class ScreenLockerTester
{
25 virtual ~ScreenLockerTester();
27 // Returns true if the screen is locked.
28 virtual bool IsLocked();
30 // Injects MockAuthenticate that uses given |user| and |password|.
31 virtual void InjectMockAuthenticator(const std::string
& user
,
32 const std::string
& password
);
34 // Sets the password text.
35 virtual void SetPassword(const std::string
& password
) = 0;
37 // Gets the password text.
38 virtual std::string
GetPassword() = 0;
40 // Emulates entring a password.
41 virtual void EnterPassword(const std::string
& password
) = 0;
43 // Emulates the ready message from window manager.
44 virtual void EmulateWindowManagerReady() = 0;
46 // Returns the widget for screen locker window.
47 virtual views::Widget
* GetWidget() const = 0;
49 virtual views::Widget
* GetChildWidget() const = 0;
54 } // namespace chromeos
56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_TESTER_H_