| 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 14 matching lines...) Expand all Loading... |
| 25 virtual ~AuraTestBase(); | 25 virtual ~AuraTestBase(); |
| 26 | 26 |
| 27 // testing::Test: | 27 // testing::Test: |
| 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|. | |
| 36 aura::Window* CreateTransientChild(int id, aura::Window* parent); | |
| 37 | |
| 38 protected: | 35 protected: |
| 39 void RunAllPendingInMessageLoop(); | 36 void RunAllPendingInMessageLoop(); |
| 40 | 37 |
| 41 void ParentWindow(Window* window); | 38 void ParentWindow(Window* window); |
| 42 | 39 |
| 43 Window* root_window() { return helper_->root_window(); } | 40 Window* root_window() { return helper_->root_window(); } |
| 44 RootWindow* dispatcher() { return helper_->dispatcher(); } | 41 RootWindow* dispatcher() { return helper_->dispatcher(); } |
| 45 TestScreen* test_screen() { return helper_->test_screen(); } | 42 TestScreen* test_screen() { return helper_->test_screen(); } |
| 46 | 43 |
| 47 private: | 44 private: |
| 48 bool setup_called_; | 45 bool setup_called_; |
| 49 bool teardown_called_; | 46 bool teardown_called_; |
| 50 base::MessageLoopForUI message_loop_; | 47 base::MessageLoopForUI message_loop_; |
| 51 scoped_ptr<AuraTestHelper> helper_; | 48 scoped_ptr<AuraTestHelper> helper_; |
| 52 | 49 |
| 53 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); | 50 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); |
| 54 }; | 51 }; |
| 55 | 52 |
| 56 } // namespace test | 53 } // namespace test |
| 57 } // namespace aura | 54 } // namespace aura |
| 58 | 55 |
| 59 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ | 56 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ |
| OLD | NEW |