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_BASE_H_ | 5 #ifndef UI_AURA_TEST_AURA_TEST_BASE_H_ |
6 #define UI_AURA_TEST_AURA_TEST_BASE_H_ | 6 #define UI_AURA_TEST_AURA_TEST_BASE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 virtual void SetUp() OVERRIDE; | 28 virtual void SetUp() OVERRIDE; |
29 virtual void TearDown() OVERRIDE; | 29 virtual void TearDown() OVERRIDE; |
30 | 30 |
31 // Creates a normal window parented to |parent|. | 31 // Creates a normal window parented to |parent|. |
32 aura::Window* CreateNormalWindow(int id, Window* parent, | 32 aura::Window* CreateNormalWindow(int id, Window* parent, |
33 aura::WindowDelegate* delegate); | 33 aura::WindowDelegate* delegate); |
34 | 34 |
35 // Creates a transient window that is transient to |parent|. | 35 // Creates a transient window that is transient to |parent|. |
36 aura::Window* CreateTransientChild(int id, aura::Window* parent); | 36 aura::Window* CreateTransientChild(int id, aura::Window* parent); |
37 | 37 |
38 // Attach |window| to the current shell's root window. | |
39 void SetDefaultParentByPrimaryRootWindow(aura::Window* window); | |
40 | |
41 protected: | 38 protected: |
42 void RunAllPendingInMessageLoop(); | 39 void RunAllPendingInMessageLoop(); |
43 | 40 |
| 41 void ParentWindow(Window* window); |
| 42 |
44 RootWindow* root_window() { return helper_->root_window(); } | 43 RootWindow* root_window() { return helper_->root_window(); } |
45 | 44 |
46 private: | 45 private: |
47 bool setup_called_; | 46 bool setup_called_; |
48 bool teardown_called_; | 47 bool teardown_called_; |
49 base::MessageLoopForUI message_loop_; | 48 base::MessageLoopForUI message_loop_; |
50 scoped_ptr<AuraTestHelper> helper_; | 49 scoped_ptr<AuraTestHelper> helper_; |
51 | 50 |
52 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); | 51 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); |
53 }; | 52 }; |
54 | 53 |
55 } // namespace test | 54 } // namespace test |
56 } // namespace aura | 55 } // namespace aura |
57 | 56 |
58 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ | 57 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ |
OLD | NEW |