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 26 matching lines...) Expand all Loading... |
37 // Note: Before adding methods to this class, please, please, please think about | 37 // Note: Before adding methods to this class, please, please, please think about |
38 // whether they should go here or in a more specific subclass. Lots of things | 38 // whether they should go here or in a more specific subclass. Lots of things |
39 // need an ExtensionService, but they don't all need to know how you want yours | 39 // need an ExtensionService, but they don't all need to know how you want yours |
40 // to be initialized. | 40 // to be initialized. |
41 class ExtensionServiceTestBase : public testing::Test { | 41 class ExtensionServiceTestBase : public testing::Test { |
42 public: | 42 public: |
43 struct ExtensionServiceInitParams { | 43 struct ExtensionServiceInitParams { |
44 base::FilePath profile_path; | 44 base::FilePath profile_path; |
45 base::FilePath pref_file; | 45 base::FilePath pref_file; |
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_managed; // 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 protected: | 56 protected: |
57 ExtensionServiceTestBase(); | 57 ExtensionServiceTestBase(); |
58 virtual ~ExtensionServiceTestBase(); | 58 virtual ~ExtensionServiceTestBase(); |
59 | 59 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 #if defined OS_CHROMEOS | 136 #if defined OS_CHROMEOS |
137 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 137 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
138 chromeos::ScopedTestCrosSettings test_cros_settings_; | 138 chromeos::ScopedTestCrosSettings test_cros_settings_; |
139 chromeos::ScopedTestUserManager test_user_manager_; | 139 chromeos::ScopedTestUserManager test_user_manager_; |
140 #endif | 140 #endif |
141 }; | 141 }; |
142 | 142 |
143 } // namespace extensions | 143 } // namespace extensions |
144 | 144 |
145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ | 145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
OLD | NEW |