Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 // the ash target that was linked against: //ash:test_support_with_content | 27 // the ash target that was linked against: //ash:test_support_with_content |
| 28 // includes AshTestEnvironmentContent and //ash:test_support_without_content | 28 // includes AshTestEnvironmentContent and //ash:test_support_without_content |
| 29 // includes AshTestEnvironmentDefault. | 29 // includes AshTestEnvironmentDefault. |
| 30 class AshTestEnvironment { | 30 class AshTestEnvironment { |
| 31 public: | 31 public: |
| 32 virtual ~AshTestEnvironment() {} | 32 virtual ~AshTestEnvironment() {} |
| 33 | 33 |
| 34 // Creates the object appropriate to the current environment. | 34 // Creates the object appropriate to the current environment. |
| 35 static std::unique_ptr<AshTestEnvironment> Create(); | 35 static std::unique_ptr<AshTestEnvironment> Create(); |
| 36 | 36 |
| 37 // Adds environment specific resources to ResourceBundle. | |
|
msw
2016/09/06 22:57:38
Should this instead just provide a string or file
sky
2016/09/06 23:25:00
I agree. I got lazy. Done.
| |
| 38 static void AddDataPacks(); | |
|
msw
2016/09/06 22:57:38
nit: maybe AddDataPacksToResourceBundle or similar
| |
| 39 | |
| 37 // Called from AshTestHelper::SetUp()/TearDown(). | 40 // Called from AshTestHelper::SetUp()/TearDown(). |
| 38 virtual void SetUp() {} | 41 virtual void SetUp() {} |
| 39 virtual void TearDown() {} | 42 virtual void TearDown() {} |
| 40 | 43 |
| 41 virtual base::SequencedWorkerPool* GetBlockingPool() = 0; | 44 virtual base::SequencedWorkerPool* GetBlockingPool() = 0; |
| 42 | 45 |
| 43 virtual std::unique_ptr<views::ViewsDelegate> CreateViewsDelegate() = 0; | 46 virtual std::unique_ptr<views::ViewsDelegate> CreateViewsDelegate() = 0; |
| 44 | 47 |
| 45 protected: | 48 protected: |
| 46 AshTestEnvironment() {} | 49 AshTestEnvironment() {} |
| 47 }; | 50 }; |
| 48 | 51 |
| 49 } // namespace test | 52 } // namespace test |
| 50 } // namespace ash | 53 } // namespace ash |
| 51 | 54 |
| 52 #endif // ASH_TEST_ASH_TEST_ENVIRONMENT_H_ | 55 #endif // ASH_TEST_ASH_TEST_ENVIRONMENT_H_ |
| OLD | NEW |