| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/extension_test_notification_observer.h" | 8 #include "chrome/browser/extensions/extension_test_notification_observer.h" |
| 9 #include "chrome/common/extensions/features/feature_channel.h" |
| 9 #include "chrome/test/base/web_ui_browser_test.h" | 10 #include "chrome/test/base/web_ui_browser_test.h" |
| 10 #include "extensions/browser/test_management_policy.h" | 11 #include "extensions/browser/test_management_policy.h" |
| 11 #include "extensions/common/extension.h" | 12 #include "extensions/common/extension.h" |
| 13 #include "extensions/common/feature_switch.h" |
| 12 | 14 |
| 13 class Profile; | 15 class Profile; |
| 14 | 16 |
| 15 // C++ test fixture used by extension_settings_browsertest.js. | 17 // C++ test fixture used by extension_settings_browsertest.js. |
| 16 class ExtensionSettingsUIBrowserTest : public WebUIBrowserTest { | 18 class ExtensionSettingsUIBrowserTest : public WebUIBrowserTest { |
| 17 public: | 19 public: |
| 18 ExtensionSettingsUIBrowserTest(); | 20 ExtensionSettingsUIBrowserTest(); |
| 19 ~ExtensionSettingsUIBrowserTest() override; | 21 ~ExtensionSettingsUIBrowserTest() override; |
| 20 | 22 |
| 21 protected: | 23 protected: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 void InstallErrorsExtension(); | 35 void InstallErrorsExtension(); |
| 34 | 36 |
| 35 void InstallSharedModule(); | 37 void InstallSharedModule(); |
| 36 | 38 |
| 37 void InstallPackagedApp(); | 39 void InstallPackagedApp(); |
| 38 | 40 |
| 39 void AddManagedPolicyProvider(); | 41 void AddManagedPolicyProvider(); |
| 40 | 42 |
| 41 void SetAutoConfirmUninstall(); | 43 void SetAutoConfirmUninstall(); |
| 42 | 44 |
| 45 // Enables the error console so errors are displayed in the extensions page. |
| 46 void EnableErrorConsole(); |
| 47 |
| 43 private: | 48 private: |
| 44 bool WaitForExtensionViewsToLoad(); | 49 bool WaitForExtensionViewsToLoad(); |
| 45 const extensions::Extension* InstallUnpackedExtension( | 50 const extensions::Extension* InstallUnpackedExtension( |
| 46 const base::FilePath& path); | 51 const base::FilePath& path); |
| 47 const extensions::Extension* InstallExtension(const base::FilePath& path); | 52 const extensions::Extension* InstallExtension(const base::FilePath& path); |
| 48 | 53 |
| 49 scoped_ptr<ExtensionTestNotificationObserver> observer_; | 54 scoped_ptr<ExtensionTestNotificationObserver> observer_; |
| 50 | 55 |
| 51 // The default profile to be used. | 56 // The default profile to be used. |
| 52 Profile* profile_; | 57 Profile* profile_; |
| 53 | 58 |
| 54 // Used to simulate managed extensions (by being registered as a provider). | 59 // Used to simulate managed extensions (by being registered as a provider). |
| 55 extensions::TestManagementPolicyProvider policy_provider_; | 60 extensions::TestManagementPolicyProvider policy_provider_; |
| 56 | 61 |
| 57 base::FilePath test_data_dir_; | 62 base::FilePath test_data_dir_; |
| 58 | 63 |
| 64 // Used to enable the error console. |
| 65 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> error_console_override_; |
| 66 |
| 59 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsUIBrowserTest); | 67 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsUIBrowserTest); |
| 60 }; | 68 }; |
| 61 | 69 |
| 62 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_ | 70 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_ |
| OLD | NEW |