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

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

Issue 2400063003: Adds more BUILD.gns to ash (Closed)
Patch Set: feedback Created 4 years, 2 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') | chrome/test/BUILD.gn » ('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 2016 The Chromium Authors. All rights reserved. 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 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_ENVIRONMENT_H_ 5 #ifndef ASH_TEST_ASH_TEST_ENVIRONMENT_H_
6 #define ASH_TEST_ASH_TEST_ENVIRONMENT_H_ 6 #define ASH_TEST_ASH_TEST_ENVIRONMENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 namespace base { 11 namespace base {
12 class SequencedWorkerPool; 12 class SequencedWorkerPool;
13 } 13 }
14 14
15 namespace views { 15 namespace views {
16 class ViewsDelegate; 16 class ViewsDelegate;
17 } 17 }
18 18
19 namespace ash { 19 namespace ash {
20 namespace test { 20 namespace test {
21 21
22 // AshTestEnvironment creates objects specific to an environment. Two 22 // AshTestEnvironment creates objects specific to an environment. Two
23 // environments are provided, one for content (AshTestEnvironmentContent) 23 // environments are provided, one for content (AshTestEnvironmentContent)
24 // and one without content (AshTestEnvironmentDefault). 24 // and one without content (AshTestEnvironmentDefault).
25 // 25 //
26 // AshTestBase creates an AshTestEnvironment by way of 26 // AshTestBase creates an AshTestEnvironment by way of
27 // AshTestEnvironment::Create(). The implementation of Create() depends upon 27 // AshTestEnvironment::Create(). The implementation of Create() depends upon
28 // the ash target that was linked against: //ash:test_support_with_content 28 // the ash target that was linked against: //ash/test:test_support_with_content
29 // includes AshTestEnvironmentContent and //ash:test_support_without_content 29 // includes AshTestEnvironmentContent and
30 // includes AshTestEnvironmentDefault. 30 // //ash/test:test_support_without_content includes AshTestEnvironmentDefault.
31 class AshTestEnvironment { 31 class AshTestEnvironment {
32 public: 32 public:
33 virtual ~AshTestEnvironment() {} 33 virtual ~AshTestEnvironment() {}
34 34
35 // Creates the object appropriate to the current environment. 35 // Creates the object appropriate to the current environment.
36 static std::unique_ptr<AshTestEnvironment> Create(); 36 static std::unique_ptr<AshTestEnvironment> Create();
37 37
38 // Returns the ASCII file name of where the 100% resources are stored. 38 // Returns the ASCII file name of where the 100% resources are stored.
39 static std::string Get100PercentResourceFileName(); 39 static std::string Get100PercentResourceFileName();
40 40
41 // Called from AshTestHelper::SetUp()/TearDown(). 41 // Called from AshTestHelper::SetUp()/TearDown().
42 virtual void SetUp() {} 42 virtual void SetUp() {}
43 virtual void TearDown() {} 43 virtual void TearDown() {}
44 44
45 virtual base::SequencedWorkerPool* GetBlockingPool() = 0; 45 virtual base::SequencedWorkerPool* GetBlockingPool() = 0;
46 46
47 virtual std::unique_ptr<views::ViewsDelegate> CreateViewsDelegate() = 0; 47 virtual std::unique_ptr<views::ViewsDelegate> CreateViewsDelegate() = 0;
48 48
49 protected: 49 protected:
50 AshTestEnvironment() {} 50 AshTestEnvironment() {}
51 }; 51 };
52 52
53 } // namespace test 53 } // namespace test
54 } // namespace ash 54 } // namespace ash
55 55
56 #endif // ASH_TEST_ASH_TEST_ENVIRONMENT_H_ 56 #endif // ASH_TEST_ASH_TEST_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « ash/test/BUILD.gn ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698