Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: ash/login/ui/login_test_base.h

Issue 2896533002: cros: Simple password view for lock. Adds test support. (Closed)
Patch Set: Initial upload Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 user_manager {
12 class FakeUserManager;
13 }
14
15 namespace views {
16 class View;
17 class Widget;
18 } // namespace views
19
20 namespace ash {
21
22 // Base test fixture for testing the views-based login and lock screens. This
23 // class provides easy access to types which the login/lock frequently need.
24 class LoginTestBase : public test::AshTestBase {
25 public:
26 LoginTestBase();
27 ~LoginTestBase() override;
28
29 // Creates and displays a widget containing |content|.
30 void ShowWidgetWithContent(views::View* content);
31
32 views::Widget* widget() const { return widget_; }
33
34 user_manager::FakeUserManager* fake_user_manager() const {
35 return fake_user_manager_.get();
36 }
37
38 // test::AshTestBase:
39 void SetUp() override;
40 void TearDown() override;
41
42 private:
43 class WidgetDelegate;
44
45 views::Widget* widget_ = nullptr;
46 std::unique_ptr<WidgetDelegate> delegate_;
47 std::unique_ptr<user_manager::FakeUserManager> fake_user_manager_;
48
49 DISALLOW_COPY_AND_ASSIGN(LoginTestBase);
50 };
51
52 } // namespace ash
53
54 #endif // ASH_LOGIN_UI_LOGIN_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698