OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_AURA_TEST_AURA_TEST_HELPER_H_ | 5 #ifndef UI_AURA_TEST_AURA_TEST_HELPER_H_ |
6 #define UI_AURA_TEST_AURA_TEST_HELPER_H_ | 6 #define UI_AURA_TEST_AURA_TEST_HELPER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class ScopedAnimationDurationScaleMode; | 25 class ScopedAnimationDurationScaleMode; |
26 } | 26 } |
27 | 27 |
28 namespace aura { | 28 namespace aura { |
29 class TestScreen; | 29 class TestScreen; |
30 namespace client { | 30 namespace client { |
31 class DefaultCaptureClient; | 31 class DefaultCaptureClient; |
32 class FocusClient; | 32 class FocusClient; |
33 } | 33 } |
34 namespace test { | 34 namespace test { |
35 class TestWindowTreeClient; | 35 class TestWindowParentingClient; |
36 | 36 |
37 // A helper class owned by tests that does common initialization required for | 37 // A helper class owned by tests that does common initialization required for |
38 // Aura use. This class creates a root window with clients and other objects | 38 // Aura use. This class creates a root window with clients and other objects |
39 // that are necessary to run test on Aura. | 39 // that are necessary to run test on Aura. |
40 class AuraTestHelper { | 40 class AuraTestHelper { |
41 public: | 41 public: |
42 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); | 42 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); |
43 ~AuraTestHelper(); | 43 ~AuraTestHelper(); |
44 | 44 |
45 // Creates and initializes (shows and sizes) the RootWindow for use in tests. | 45 // Creates and initializes (shows and sizes) the RootWindow for use in tests. |
(...skipping 11 matching lines...) Expand all Loading... |
57 WindowTreeHost* host() { return host_.get(); } | 57 WindowTreeHost* host() { return host_.get(); } |
58 | 58 |
59 TestScreen* test_screen() { return test_screen_.get(); } | 59 TestScreen* test_screen() { return test_screen_.get(); } |
60 | 60 |
61 private: | 61 private: |
62 base::MessageLoopForUI* message_loop_; | 62 base::MessageLoopForUI* message_loop_; |
63 bool setup_called_; | 63 bool setup_called_; |
64 bool teardown_called_; | 64 bool teardown_called_; |
65 std::unique_ptr<aura::Env> env_; | 65 std::unique_ptr<aura::Env> env_; |
66 std::unique_ptr<WindowTreeHost> host_; | 66 std::unique_ptr<WindowTreeHost> host_; |
67 std::unique_ptr<TestWindowTreeClient> stacking_client_; | 67 std::unique_ptr<TestWindowParentingClient> parenting_client_; |
68 std::unique_ptr<client::DefaultCaptureClient> capture_client_; | 68 std::unique_ptr<client::DefaultCaptureClient> capture_client_; |
69 std::unique_ptr<client::FocusClient> focus_client_; | 69 std::unique_ptr<client::FocusClient> focus_client_; |
70 std::unique_ptr<TestScreen> test_screen_; | 70 std::unique_ptr<TestScreen> test_screen_; |
71 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; | 71 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); | 73 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace test | 76 } // namespace test |
77 } // namespace aura | 77 } // namespace aura |
78 | 78 |
79 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ | 79 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ |
OLD | NEW |