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

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

Issue 2840393002: chromeos: converts TopLevelWindowFactoryTest to AshTestBase (Closed)
Patch Set: Created 3 years, 8 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
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>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // Methods to emulate blocking and unblocking user session with given 182 // Methods to emulate blocking and unblocking user session with given
183 // |block_reason|. 183 // |block_reason|.
184 void BlockUserSession(UserSessionBlockReason block_reason); 184 void BlockUserSession(UserSessionBlockReason block_reason);
185 void UnblockUserSession(); 185 void UnblockUserSession();
186 186
187 void DisableIME(); 187 void DisableIME();
188 188
189 // Swap the primary display with the secondary. 189 // Swap the primary display with the secondary.
190 void SwapPrimaryDisplay(); 190 void SwapPrimaryDisplay();
191 191
192 display::Display GetPrimaryDisplay();
192 display::Display GetSecondaryDisplay(); 193 display::Display GetSecondaryDisplay();
193 194
194 private: 195 private:
195 friend class ash::AshTestImplAura; 196 friend class ash::AshTestImplAura;
196 197
197 bool setup_called_; 198 bool setup_called_;
198 bool teardown_called_; 199 bool teardown_called_;
199 // |SetUp()| doesn't activate session if this is set to false. 200 // |SetUp()| doesn't activate session if this is set to false.
200 bool start_session_; 201 bool start_session_;
201 std::unique_ptr<AshTestEnvironment> ash_test_environment_; 202 std::unique_ptr<AshTestEnvironment> ash_test_environment_;
202 std::unique_ptr<AshTestHelper> ash_test_helper_; 203 std::unique_ptr<AshTestHelper> ash_test_helper_;
203 std::unique_ptr<ui::test::EventGenerator> event_generator_; 204 std::unique_ptr<ui::test::EventGenerator> event_generator_;
204 205
205 DISALLOW_COPY_AND_ASSIGN(AshTestBase); 206 DISALLOW_COPY_AND_ASSIGN(AshTestBase);
206 }; 207 };
207 208
208 class NoSessionAshTestBase : public AshTestBase { 209 class NoSessionAshTestBase : public AshTestBase {
209 public: 210 public:
210 NoSessionAshTestBase() { set_start_session(false); } 211 NoSessionAshTestBase() { set_start_session(false); }
211 ~NoSessionAshTestBase() override {} 212 ~NoSessionAshTestBase() override {}
212 213
213 private: 214 private:
214 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); 215 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase);
215 }; 216 };
216 217
217 } // namespace test 218 } // namespace test
218 } // namespace ash 219 } // namespace ash
219 220
220 #endif // ASH_TEST_ASH_TEST_BASE_H_ 221 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698