Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#include "base/basictypes.h"

namespace views {
class Button;
class Textfield;
class Widget;
}  // namespace views

namespace chromeos {

class ScreenLocker;

namespace test {

// ScreenLockerTester provides access to the private state/function
// of ScreenLocker class. Used to implement unit tests.
class ScreenLockerTester {
  // Returns true if the screen lock is open.
  bool IsOpen();

  // Injects MockAuthenticate that uses given |user| and |password|.
  void InjectMockAuthenticator(const char* user, const char* password);

  // Emulates entring a password.
  void EnterPassword(const char* password);

  // Emulates the ready message from window manager.
  void EmulateWindowManagerReady();

  // Returns the widget for screen locker window.
  views::Widget* GetWidget();

  friend class chromeos::ScreenLocker;

  ScreenLockerTester() {}

  views::Textfield* GetPasswordField();


}  // namespace test

}  // namespace chromeos


Generated by  Doxygen 1.6.0   Back to index