| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_TEST_EXTENSION_ENVIRONMENT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "content/public/test/test_browser_thread_bundle.h" | 10 #include "content/public/test/test_browser_thread_bundle.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Returns ExtensionPrefs created (and owned) by the | 55 // Returns ExtensionPrefs created (and owned) by the |
| 56 // TestExtensionSystem created by the TestingProfile. | 56 // TestExtensionSystem created by the TestingProfile. |
| 57 ExtensionPrefs* GetExtensionPrefs(); | 57 ExtensionPrefs* GetExtensionPrefs(); |
| 58 | 58 |
| 59 // Creates an Extension and registers it with the ExtensionService. | 59 // Creates an Extension and registers it with the ExtensionService. |
| 60 // The Extension has a default manifest of {name: "Extension", | 60 // The Extension has a default manifest of {name: "Extension", |
| 61 // version: "1.0", manifest_version: 2}, and values in | 61 // version: "1.0", manifest_version: 2}, and values in |
| 62 // manifest_extra override these defaults. | 62 // manifest_extra override these defaults. |
| 63 const Extension* MakeExtension(const base::Value& manifest_extra); | 63 const Extension* MakeExtension(const base::Value& manifest_extra); |
| 64 | 64 |
| 65 // Use a specific extension ID instead of the default generated in |
| 66 // Extension::Create. |
| 67 const Extension* MakeExtension(const base::Value& manifest_extra, |
| 68 const std::string& id); |
| 69 |
| 65 // Returns a test web contents that has a tab id. | 70 // Returns a test web contents that has a tab id. |
| 66 scoped_ptr<content::WebContents> MakeTab() const; | 71 scoped_ptr<content::WebContents> MakeTab() const; |
| 67 | 72 |
| 68 private: | 73 private: |
| 69 content::TestBrowserThreadBundle thread_bundle_; | 74 content::TestBrowserThreadBundle thread_bundle_; |
| 70 | 75 |
| 71 #if defined(OS_CHROMEOS) | 76 #if defined(OS_CHROMEOS) |
| 72 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 77 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
| 73 chromeos::ScopedTestCrosSettings test_cros_settings_; | 78 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| 74 chromeos::ScopedTestUserManager test_user_manager_; | 79 chromeos::ScopedTestUserManager test_user_manager_; |
| 75 #endif | 80 #endif |
| 76 | 81 |
| 77 #if defined(OS_WIN) | 82 #if defined(OS_WIN) |
| 78 ui::ScopedOleInitializer ole_initializer_; | 83 ui::ScopedOleInitializer ole_initializer_; |
| 79 #endif | 84 #endif |
| 80 scoped_ptr<TestingProfile> profile_; | 85 scoped_ptr<TestingProfile> profile_; |
| 81 ExtensionService* extension_service_; | 86 ExtensionService* extension_service_; |
| 82 ExtensionPrefs* extension_prefs_; | 87 ExtensionPrefs* extension_prefs_; |
| 83 }; | 88 }; |
| 84 | 89 |
| 85 } // namespace extensions | 90 } // namespace extensions |
| 86 | 91 |
| 87 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ | 92 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ |
| OLD | NEW |