OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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. |
| 4 |
| 5 #ifndef ASH_LOGIN_UI_LOGIN_TEST_BASE_H_ |
| 6 #define ASH_LOGIN_UI_LOGIN_TEST_BASE_H_ |
| 7 |
| 8 #include "ash/test/ash_test_base.h" |
| 9 #include "base/macros.h" |
| 10 |
| 11 namespace views { |
| 12 class View; |
| 13 class Widget; |
| 14 } // namespace views |
| 15 |
| 16 namespace ash { |
| 17 |
| 18 // Base test fixture for testing the views-based login and lock screens. This |
| 19 // class provides easy access to types which the login/lock frequently need. |
| 20 class LoginTestBase : public test::AshTestBase { |
| 21 public: |
| 22 LoginTestBase(); |
| 23 ~LoginTestBase() override; |
| 24 |
| 25 // Creates and displays a widget containing |content|. |
| 26 void ShowWidgetWithContent(views::View* content); |
| 27 |
| 28 views::Widget* widget() const { return widget_; } |
| 29 |
| 30 // test::AshTestBase: |
| 31 void TearDown() override; |
| 32 |
| 33 private: |
| 34 class WidgetDelegate; |
| 35 |
| 36 views::Widget* widget_ = nullptr; |
| 37 std::unique_ptr<WidgetDelegate> delegate_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(LoginTestBase); |
| 40 }; |
| 41 |
| 42 } // namespace ash |
| 43 |
| 44 #endif // ASH_LOGIN_UI_LOGIN_TEST_BASE_H_ |
OLD | NEW |