OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 private: | 133 private: |
134 // Must be declared before anything that may make use of the | 134 // Must be declared before anything that may make use of the |
135 // directory so as to ensure files are closed before cleanup. | 135 // directory so as to ensure files are closed before cleanup. |
136 base::ScopedTempDir temp_dir_; | 136 base::ScopedTempDir temp_dir_; |
137 | 137 |
138 // Destroying at_exit_manager_ will delete all LazyInstances, so it must come | 138 // Destroying at_exit_manager_ will delete all LazyInstances, so it must come |
139 // after thread_bundle_ in the destruction order. | 139 // after thread_bundle_ in the destruction order. |
140 base::ShadowingAtExitManager at_exit_manager_; | 140 base::ShadowingAtExitManager at_exit_manager_; |
141 | 141 |
| 142 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
| 143 |
142 // Enable creation of WebContents without initializing a renderer. | 144 // Enable creation of WebContents without initializing a renderer. |
143 content::RenderViewHostTestEnabler rvh_test_enabler_; | 145 content::RenderViewHostTestEnabler rvh_test_enabler_; |
144 | 146 |
145 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; | |
146 | |
147 protected: | 147 protected: |
148 // It's unfortunate that these are exposed to subclasses (rather than used | 148 // It's unfortunate that these are exposed to subclasses (rather than used |
149 // through the accessor methods above), but too many tests already use them | 149 // through the accessor methods above), but too many tests already use them |
150 // directly. | 150 // directly. |
151 | 151 |
152 // The associated testing profile. | 152 // The associated testing profile. |
153 std::unique_ptr<TestingProfile> profile_; | 153 std::unique_ptr<TestingProfile> profile_; |
154 | 154 |
155 // The ExtensionService, whose lifetime is managed by |profile|'s | 155 // The ExtensionService, whose lifetime is managed by |profile|'s |
156 // ExtensionSystem. | 156 // ExtensionSystem. |
(...skipping 22 matching lines...) Expand all Loading... |
179 chromeos::ScopedTestCrosSettings test_cros_settings_; | 179 chromeos::ScopedTestCrosSettings test_cros_settings_; |
180 chromeos::ScopedTestUserManager test_user_manager_; | 180 chromeos::ScopedTestUserManager test_user_manager_; |
181 #endif | 181 #endif |
182 | 182 |
183 DISALLOW_COPY_AND_ASSIGN(ExtensionServiceTestBase); | 183 DISALLOW_COPY_AND_ASSIGN(ExtensionServiceTestBase); |
184 }; | 184 }; |
185 | 185 |
186 } // namespace extensions | 186 } // namespace extensions |
187 | 187 |
188 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ | 188 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
OLD | NEW |