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 "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 base::FilePath extensions_install_dir; | 46 base::FilePath extensions_install_dir; |
47 bool autoupdate_enabled; // defaults to false. | 47 bool autoupdate_enabled; // defaults to false. |
48 bool is_first_run; // defaults to true. | 48 bool is_first_run; // defaults to true. |
49 bool profile_is_supervised; // defaults to false. | 49 bool profile_is_supervised; // defaults to false. |
50 | 50 |
51 // Though you could use this constructor, you probably want to use | 51 // Though you could use this constructor, you probably want to use |
52 // CreateDefaultInitParams(), and then make a change or two. | 52 // CreateDefaultInitParams(), and then make a change or two. |
53 ExtensionServiceInitParams(); | 53 ExtensionServiceInitParams(); |
54 }; | 54 }; |
55 | 55 |
| 56 // Public because parameterized test cases need it to be, or else the compiler |
| 57 // barfs. |
| 58 static void SetUpTestCase(); // faux-verride (static override). |
| 59 |
56 protected: | 60 protected: |
57 ExtensionServiceTestBase(); | 61 ExtensionServiceTestBase(); |
58 virtual ~ExtensionServiceTestBase(); | 62 virtual ~ExtensionServiceTestBase(); |
59 | 63 |
60 // testing::Test implementation. | 64 // testing::Test implementation. |
61 virtual void SetUp() override; | 65 virtual void SetUp() override; |
62 static void SetUpTestCase(); // faux-verride (static override). | |
63 | 66 |
64 // Create a set of InitParams to install an ExtensionService into |temp_dir_|. | 67 // Create a set of InitParams to install an ExtensionService into |temp_dir_|. |
65 ExtensionServiceInitParams CreateDefaultInitParams(); | 68 ExtensionServiceInitParams CreateDefaultInitParams(); |
66 | 69 |
67 // Initialize an ExtensionService according to the given |params|. | 70 // Initialize an ExtensionService according to the given |params|. |
68 void InitializeExtensionService(const ExtensionServiceInitParams& params); | 71 void InitializeExtensionService(const ExtensionServiceInitParams& params); |
69 | 72 |
70 // Initialize an empty ExtensionService using the default init params. | 73 // Initialize an empty ExtensionService using the default init params. |
71 void InitializeEmptyExtensionService(); | 74 void InitializeEmptyExtensionService(); |
72 | 75 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 #if defined OS_CHROMEOS | 139 #if defined OS_CHROMEOS |
137 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 140 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
138 chromeos::ScopedTestCrosSettings test_cros_settings_; | 141 chromeos::ScopedTestCrosSettings test_cros_settings_; |
139 chromeos::ScopedTestUserManager test_user_manager_; | 142 chromeos::ScopedTestUserManager test_user_manager_; |
140 #endif | 143 #endif |
141 }; | 144 }; |
142 | 145 |
143 } // namespace extensions | 146 } // namespace extensions |
144 | 147 |
145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ | 148 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
OLD | NEW |