| Index: ash/login/ui/login_test_base.h
|
| diff --git a/ash/login/ui/login_test_base.h b/ash/login/ui/login_test_base.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..180715ad3fac9de3f60e8c9fb2c27ba98482ec2f
|
| --- /dev/null
|
| +++ b/ash/login/ui/login_test_base.h
|
| @@ -0,0 +1,54 @@
|
| +// Copyright 2017 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.
|
| +
|
| +#ifndef ASH_LOGIN_UI_LOGIN_TEST_BASE_H_
|
| +#define ASH_LOGIN_UI_LOGIN_TEST_BASE_H_
|
| +
|
| +#include "ash/test/ash_test_base.h"
|
| +#include "base/macros.h"
|
| +
|
| +namespace user_manager {
|
| +class FakeUserManager;
|
| +}
|
| +
|
| +namespace views {
|
| +class View;
|
| +class Widget;
|
| +} // namespace views
|
| +
|
| +namespace ash {
|
| +
|
| +// Base test fixture for testing the views-based login and lock screens. This
|
| +// class provides easy access to types which the login/lock frequently need.
|
| +class LoginTestBase : public test::AshTestBase {
|
| + public:
|
| + LoginTestBase();
|
| + ~LoginTestBase() override;
|
| +
|
| + // Creates and displays a widget containing |content|.
|
| + void ShowWidgetWithContent(views::View* content);
|
| +
|
| + views::Widget* widget() const { return widget_; }
|
| +
|
| + user_manager::FakeUserManager* fake_user_manager() const {
|
| + return fake_user_manager_.get();
|
| + }
|
| +
|
| + // test::AshTestBase:
|
| + void SetUp() override;
|
| + void TearDown() override;
|
| +
|
| + private:
|
| + class WidgetDelegate;
|
| +
|
| + views::Widget* widget_ = nullptr;
|
| + std::unique_ptr<WidgetDelegate> delegate_;
|
| + std::unique_ptr<user_manager::FakeUserManager> fake_user_manager_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(LoginTestBase);
|
| +};
|
| +
|
| +} // namespace ash
|
| +
|
| +#endif // ASH_LOGIN_UI_LOGIN_TEST_BASE_H_
|
|
|