Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / webui / extensions / extension_settings_browsertest.h
blobcfa6462e85b4a3bf30ff043047498b494af5e806
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_
8 #include "chrome/browser/extensions/extension_test_notification_observer.h"
9 #include "chrome/test/base/web_ui_browser_test.h"
10 #include "extensions/browser/test_management_policy.h"
11 #include "extensions/common/extension.h"
13 class Profile;
15 // C++ test fixture used by extension_settings_browsertest.js.
16 class ExtensionSettingsUIBrowserTest : public WebUIBrowserTest {
17 public:
18 ExtensionSettingsUIBrowserTest();
19 ~ExtensionSettingsUIBrowserTest() override;
21 protected:
22 // Get the profile to use.
23 Profile* GetProfile();
25 const std::string& last_loaded_extension_id() {
26 return observer_->last_loaded_extension_id();
29 void SetUpOnMainThread() override;
31 void InstallGoodExtension();
33 void InstallErrorsExtension();
35 void AddManagedPolicyProvider();
37 private:
38 bool WaitForExtensionViewsToLoad();
39 const extensions::Extension* InstallUnpackedExtension(
40 const base::FilePath& path, const char* id);
41 const extensions::Extension* InstallExtension(const base::FilePath& path);
43 scoped_ptr<ExtensionTestNotificationObserver> observer_;
45 // The default profile to be used.
46 Profile* profile_;
48 // Used to simulate managed extensions (by being registered as a provider).
49 extensions::TestManagementPolicyProvider policy_provider_;
51 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsUIBrowserTest);
54 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_BROWSERTEST_H_