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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 // A helper class owned by tests that does common initialization required for | 31 // A helper class owned by tests that does common initialization required for |
32 // Aura use. This class creates a root window with clients and other objects | 32 // Aura use. This class creates a root window with clients and other objects |
33 // that are necessary to run test on Aura. | 33 // that are necessary to run test on Aura. |
34 class AuraTestHelper { | 34 class AuraTestHelper { |
35 public: | 35 public: |
36 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); | 36 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); |
37 ~AuraTestHelper(); | 37 ~AuraTestHelper(); |
38 | 38 |
39 // Creates and initializes (shows and sizes) the RootWindow for use in tests. | 39 // Creates and initializes (shows and sizes) the RootWindow for use in tests. |
40 void SetUp(bool allow_test_contexts); | 40 void SetUp(); |
41 | 41 |
42 // Clean up objects that are created for tests. This also deletes the Env | 42 // Clean up objects that are created for tests. This also deletes the Env |
43 // object. | 43 // object. |
44 void TearDown(); | 44 void TearDown(); |
45 | 45 |
46 // Flushes message loop. | 46 // Flushes message loop. |
47 void RunAllPendingInMessageLoop(); | 47 void RunAllPendingInMessageLoop(); |
48 | 48 |
49 Window* root_window() { return root_window_->window(); } | 49 Window* root_window() { return root_window_->window(); } |
50 RootWindow* dispatcher() { return root_window_.get(); } | 50 RootWindow* dispatcher() { return root_window_.get(); } |
(...skipping 14 matching lines...) Expand all Loading... |
65 scoped_ptr<TestScreen> test_screen_; | 65 scoped_ptr<TestScreen> test_screen_; |
66 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; | 66 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); | 68 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace test | 71 } // namespace test |
72 } // namespace aura | 72 } // namespace aura |
73 | 73 |
74 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ | 74 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ |
OLD | NEW |