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

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

Issue 2296973002: Moves ash content specific tests into ash_content_unittests (Closed)
Patch Set: add dep to base test suport Created 4 years, 3 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/ash_test_base.cc ('k') | ash/test/ash_test_environment_content.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_TEST_ASH_TEST_ENVIRONMENT_H_
6 #define ASH_TEST_ASH_TEST_ENVIRONMENT_H_
7
8 #include <memory>
9
10 namespace base {
11 class SequencedWorkerPool;
12 }
13
14 namespace views {
15 class ViewsDelegate;
16 }
17
18 namespace ash {
19 namespace test {
20
21 // AshTestEnvironment creates objects specific to an environment. Two
22 // environments are provided, one for content (AshTestEnvironmentContent)
23 // and one without content (AshTestEnvironmentDefault).
24 //
25 // AshTestBase creates an AshTestEnvironment by way of
26 // AshTestEnvironment::Create(). The implementation of Create() depends upon
27 // the ash target that was linked against: //ash:test_support_with_content
28 // includes AshTestEnvironmentContent and //ash:test_support_without_content
29 // includes AshTestEnvironmentDefault.
30 class AshTestEnvironment {
31 public:
32 virtual ~AshTestEnvironment() {}
33
34 // Creates the object appropriate to the current environment.
35 static std::unique_ptr<AshTestEnvironment> Create();
36
37 // Called from AshTestHelper::SetUp()/TearDown().
38 virtual void SetUp() {}
39 virtual void TearDown() {}
40
41 virtual base::SequencedWorkerPool* GetBlockingPool() = 0;
42
43 virtual std::unique_ptr<views::ViewsDelegate> CreateViewsDelegate() = 0;
44
45 protected:
46 AshTestEnvironment() {}
47 };
48
49 } // namespace test
50 } // namespace ash
51
52 #endif // ASH_TEST_ASH_TEST_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/ash_test_environment_content.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698