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

Side by Side Diff: ash/test/ash_test_base.h

Issue 2694623016: chromeos: Makes AshTestBase/Helper target mash when appropriate (Closed)
Patch Set: feedback Created 3 years, 10 months 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 | « ash/test/BUILD.gn ('k') | ash/test/ash_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 ASH_TEST_ASH_TEST_BASE_H_ 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_
6 #define ASH_TEST_ASH_TEST_BASE_H_ 6 #define ASH_TEST_ASH_TEST_BASE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "third_party/skia/include/core/SkColor.h" 17 #include "third_party/skia/include/core/SkColor.h"
18 #include "ui/display/display.h" 18 #include "ui/display/display.h"
19 #include "ui/wm/public/window_types.h" 19 #include "ui/wm/public/window_types.h"
20 20
21 namespace aura { 21 namespace aura {
22 class Window; 22 class Window;
23 class WindowDelegate; 23 class WindowDelegate;
24 } // namespace aura 24 } // namespace aura
25 25
26 namespace display { 26 namespace display {
27 class Display;
27 class DisplayManager; 28 class DisplayManager;
28 29
29 namespace test { 30 namespace test {
30 class DisplayManagerTestApi; 31 class DisplayManagerTestApi;
31 } // namespace test 32 } // namespace test
32 } // namespace display 33 } // namespace display
33 34
34 namespace gfx { 35 namespace gfx {
35 class Rect; 36 class Rect;
36 } 37 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Methods to emulate blocking and unblocking user session with given 162 // Methods to emulate blocking and unblocking user session with given
162 // |block_reason|. 163 // |block_reason|.
163 void BlockUserSession(UserSessionBlockReason block_reason); 164 void BlockUserSession(UserSessionBlockReason block_reason);
164 void UnblockUserSession(); 165 void UnblockUserSession();
165 166
166 void DisableIME(); 167 void DisableIME();
167 168
168 // Swap the primary display with the secondary. 169 // Swap the primary display with the secondary.
169 void SwapPrimaryDisplay(); 170 void SwapPrimaryDisplay();
170 171
172 display::Display GetSecondaryDisplay();
173
171 private: 174 private:
172 friend class ash::AshTestImplAura; 175 friend class ash::AshTestImplAura;
173 176
174 bool setup_called_; 177 bool setup_called_;
175 bool teardown_called_; 178 bool teardown_called_;
176 // |SetUp()| doesn't activate session if this is set to false. 179 // |SetUp()| doesn't activate session if this is set to false.
177 bool start_session_; 180 bool start_session_;
178 std::unique_ptr<AshTestEnvironment> ash_test_environment_; 181 std::unique_ptr<AshTestEnvironment> ash_test_environment_;
179 std::unique_ptr<AshTestHelper> ash_test_helper_; 182 std::unique_ptr<AshTestHelper> ash_test_helper_;
180 std::unique_ptr<ui::test::EventGenerator> event_generator_; 183 std::unique_ptr<ui::test::EventGenerator> event_generator_;
181 184
182 DISALLOW_COPY_AND_ASSIGN(AshTestBase); 185 DISALLOW_COPY_AND_ASSIGN(AshTestBase);
183 }; 186 };
184 187
185 class NoSessionAshTestBase : public AshTestBase { 188 class NoSessionAshTestBase : public AshTestBase {
186 public: 189 public:
187 NoSessionAshTestBase() { set_start_session(false); } 190 NoSessionAshTestBase() { set_start_session(false); }
188 ~NoSessionAshTestBase() override {} 191 ~NoSessionAshTestBase() override {}
189 192
190 private: 193 private:
191 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); 194 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase);
192 }; 195 };
193 196
194 } // namespace test 197 } // namespace test
195 } // namespace ash 198 } // namespace ash
196 199
197 #endif // ASH_TEST_ASH_TEST_BASE_H_ 200 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/test/BUILD.gn ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698