| 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 <memory> |
| 9 #include <vector> |
| 10 |
| 8 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 12 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/aura/mus/property_converter.h" | 15 #include "ui/aura/mus/property_converter.h" |
| 13 #include "ui/aura/mus/window_manager_delegate.h" | 16 #include "ui/aura/mus/window_manager_delegate.h" |
| 14 #include "ui/aura/mus/window_tree_client_delegate.h" | 17 #include "ui/aura/mus/window_tree_client_delegate.h" |
| 15 #include "ui/aura/test/aura_test_helper.h" | 18 #include "ui/aura/test/aura_test_helper.h" |
| 16 | 19 |
| 17 namespace ui { | 20 namespace ui { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Only used for mus. Both are are initialized to this, but may be reset. | 125 // Only used for mus. Both are are initialized to this, but may be reset. |
| 123 WindowManagerDelegate* window_manager_delegate_; | 126 WindowManagerDelegate* window_manager_delegate_; |
| 124 WindowTreeClientDelegate* window_tree_client_delegate_; | 127 WindowTreeClientDelegate* window_tree_client_delegate_; |
| 125 | 128 |
| 126 bool use_mus_ = false; | 129 bool use_mus_ = false; |
| 127 bool setup_called_ = false; | 130 bool setup_called_ = false; |
| 128 bool teardown_called_ = false; | 131 bool teardown_called_ = false; |
| 129 base::MessageLoopForUI message_loop_; | 132 base::MessageLoopForUI message_loop_; |
| 130 PropertyConverter property_converter_; | 133 PropertyConverter property_converter_; |
| 131 std::unique_ptr<AuraTestHelper> helper_; | 134 std::unique_ptr<AuraTestHelper> helper_; |
| 132 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus_; | 135 std::vector<std::unique_ptr<WindowTreeHostMus>> window_tree_hosts_; |
| 133 | 136 |
| 134 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); | 137 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); |
| 135 }; | 138 }; |
| 136 | 139 |
| 137 // Use as a base class for tests that want to target both backends. | 140 // Use as a base class for tests that want to target both backends. |
| 138 class AuraTestBaseWithType : public AuraTestBase, | 141 class AuraTestBaseWithType : public AuraTestBase, |
| 139 public ::testing::WithParamInterface<BackendType> { | 142 public ::testing::WithParamInterface<BackendType> { |
| 140 public: | 143 public: |
| 141 AuraTestBaseWithType(); | 144 AuraTestBaseWithType(); |
| 142 ~AuraTestBaseWithType() override; | 145 ~AuraTestBaseWithType() override; |
| 143 | 146 |
| 144 // AuraTestBase: | 147 // AuraTestBase: |
| 145 void SetUp() override; | 148 void SetUp() override; |
| 146 | 149 |
| 147 private: | 150 private: |
| 148 bool setup_called_ = false; | 151 bool setup_called_ = false; |
| 149 | 152 |
| 150 DISALLOW_COPY_AND_ASSIGN(AuraTestBaseWithType); | 153 DISALLOW_COPY_AND_ASSIGN(AuraTestBaseWithType); |
| 151 }; | 154 }; |
| 152 | 155 |
| 153 } // namespace test | 156 } // namespace test |
| 154 } // namespace aura | 157 } // namespace aura |
| 155 | 158 |
| 156 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ | 159 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ |
| OLD | NEW |