| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 static const extensions::Extension* GetExtensionByPath( | 73 static const extensions::Extension* GetExtensionByPath( |
| 74 const extensions::ExtensionSet* extensions, const base::FilePath& path); | 74 const extensions::ExtensionSet* extensions, const base::FilePath& path); |
| 75 | 75 |
| 76 // InProcessBrowserTest | 76 // InProcessBrowserTest |
| 77 virtual void SetUp() OVERRIDE; | 77 virtual void SetUp() OVERRIDE; |
| 78 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 78 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
| 79 virtual void SetUpOnMainThread() OVERRIDE; | 79 virtual void SetUpOnMainThread() OVERRIDE; |
| 80 | 80 |
| 81 const extensions::Extension* LoadExtension(const base::FilePath& path); | 81 const extensions::Extension* LoadExtension(const base::FilePath& path); |
| 82 | 82 |
| 83 // Same as above, but enables the extension in incognito mode first. | 83 // Load extension and enable it in incognito mode. |
| 84 const extensions::Extension* LoadExtensionIncognito( | 84 const extensions::Extension* LoadExtensionIncognito( |
| 85 const base::FilePath& path); | 85 const base::FilePath& path); |
| 86 | 86 |
| 87 // Load extension from the |path| folder. |flags| is bit mask of values from |
| 88 // |Flags| enum. |
| 87 const extensions::Extension* LoadExtensionWithFlags( | 89 const extensions::Extension* LoadExtensionWithFlags( |
| 88 const base::FilePath& path, int flags); | 90 const base::FilePath& path, int flags); |
| 89 | 91 |
| 92 // Same as above, but sets the installation parameter to the extension |
| 93 // preferences. |
| 94 const extensions::Extension* LoadExtensionWithInstallParam( |
| 95 const base::FilePath& path, |
| 96 int flags, |
| 97 const std::string& install_param); |
| 98 |
| 90 // Loads unpacked extension from |path| with manifest |manifest_relative_path| | 99 // Loads unpacked extension from |path| with manifest |manifest_relative_path| |
| 91 // and imitates that it is a component extension. | 100 // and imitates that it is a component extension. |
| 92 // |manifest_relative_path| is relative to |path|. | 101 // |manifest_relative_path| is relative to |path|. |
| 93 const extensions::Extension* LoadExtensionAsComponentWithManifest( | 102 const extensions::Extension* LoadExtensionAsComponentWithManifest( |
| 94 const base::FilePath& path, | 103 const base::FilePath& path, |
| 95 const base::FilePath::CharType* manifest_relative_path); | 104 const base::FilePath::CharType* manifest_relative_path); |
| 96 | 105 |
| 97 // Loads unpacked extension from |path| and imitates that it is a component | 106 // Loads unpacked extension from |path| and imitates that it is a component |
| 98 // extension. Equivalent to | 107 // extension. Equivalent to |
| 99 // LoadExtensionAsComponentWithManifest(path, extensions::kManifestFilename). | 108 // LoadExtensionAsComponentWithManifest(path, extensions::kManifestFilename). |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 override_prompt_for_external_extensions_; | 351 override_prompt_for_external_extensions_; |
| 343 | 352 |
| 344 // The default profile to be used. | 353 // The default profile to be used. |
| 345 Profile* profile_; | 354 Profile* profile_; |
| 346 | 355 |
| 347 // Cache cache implementation. | 356 // Cache cache implementation. |
| 348 scoped_ptr<extensions::ExtensionCacheFake> test_extension_cache_; | 357 scoped_ptr<extensions::ExtensionCacheFake> test_extension_cache_; |
| 349 }; | 358 }; |
| 350 | 359 |
| 351 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 360 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
| OLD | NEW |