Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Side by Side Diff: ui/aura/test/aura_test_base.h

Issue 2535983004: Makes sure bounds and visibilty are updated correctly for new displays (Closed)
Patch Set: merge Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | ui/aura/test/aura_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Only used for mus. Both are are initialized to this, but may be reset. 130 // Only used for mus. Both are are initialized to this, but may be reset.
128 WindowManagerDelegate* window_manager_delegate_; 131 WindowManagerDelegate* window_manager_delegate_;
129 WindowTreeClientDelegate* window_tree_client_delegate_; 132 WindowTreeClientDelegate* window_tree_client_delegate_;
130 133
131 bool use_mus_ = false; 134 bool use_mus_ = false;
132 bool setup_called_ = false; 135 bool setup_called_ = false;
133 bool teardown_called_ = false; 136 bool teardown_called_ = false;
134 base::MessageLoopForUI message_loop_; 137 base::MessageLoopForUI message_loop_;
135 PropertyConverter property_converter_; 138 PropertyConverter property_converter_;
136 std::unique_ptr<AuraTestHelper> helper_; 139 std::unique_ptr<AuraTestHelper> helper_;
137 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus_; 140 std::vector<std::unique_ptr<WindowTreeHostMus>> window_tree_hosts_;
138 141
139 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); 142 DISALLOW_COPY_AND_ASSIGN(AuraTestBase);
140 }; 143 };
141 144
142 // Use as a base class for tests that want to target both backends. 145 // Use as a base class for tests that want to target both backends.
143 class AuraTestBaseWithType : public AuraTestBase, 146 class AuraTestBaseWithType : public AuraTestBase,
144 public ::testing::WithParamInterface<BackendType> { 147 public ::testing::WithParamInterface<BackendType> {
145 public: 148 public:
146 AuraTestBaseWithType(); 149 AuraTestBaseWithType();
147 ~AuraTestBaseWithType() override; 150 ~AuraTestBaseWithType() override;
148 151
149 // AuraTestBase: 152 // AuraTestBase:
150 void SetUp() override; 153 void SetUp() override;
151 154
152 private: 155 private:
153 bool setup_called_ = false; 156 bool setup_called_ = false;
154 157
155 DISALLOW_COPY_AND_ASSIGN(AuraTestBaseWithType); 158 DISALLOW_COPY_AND_ASSIGN(AuraTestBaseWithType);
156 }; 159 };
157 160
158 } // namespace test 161 } // namespace test
159 } // namespace aura 162 } // namespace aura
160 163
161 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ 164 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | ui/aura/test/aura_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698