summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_browsertest.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 19:39:44 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 19:39:44 +0000
commit2a409538977a7f85ba52abca9477310371d7bfdd (patch)
tree8a072552135f053819697f63eed0cb319552c6d6 /chrome/browser/extensions/extension_browsertest.h
parent312ef3281c8e678ecdd54d90764e89e5b9407ec0 (diff)
downloadchromium_src-2a409538977a7f85ba52abca9477310371d7bfdd.zip
chromium_src-2a409538977a7f85ba52abca9477310371d7bfdd.tar.gz
chromium_src-2a409538977a7f85ba52abca9477310371d7bfdd.tar.bz2
Don't show extension disabled infobar when manually updating
extensions that increase privilges. BUG=20461 Review URL: http://codereview.chromium.org/174637 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_browsertest.h')
-rw-r--r--chrome/browser/extensions/extension_browsertest.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_browsertest.h b/chrome/browser/extensions/extension_browsertest.h
index 98fb948..1910229 100644
--- a/chrome/browser/extensions/extension_browsertest.h
+++ b/chrome/browser/extensions/extension_browsertest.h
@@ -22,11 +22,22 @@ class ExtensionBrowserTest
protected:
virtual void SetUpCommandLine(CommandLine* command_line);
bool LoadExtension(const FilePath& path);
+
// |expected_change| indicates how many extensions should be installed (or
// disabled, if negative).
// 1 means you expect a new install, 0 means you expect an upgrade, -1 means
// you expect a failed upgrade.
- bool InstallExtension(const FilePath& path, int expected_change);
+ bool InstallExtension(const FilePath& path, int expected_change) {
+ return InstallOrUpdateExtension("", path, expected_change);
+ }
+
+ // Same as above but calls ExtensionsService::UpdateExtension instead of
+ // InstallExtension().
+ bool UpdateExtension(const std::string& id, const FilePath& path,
+ int expected_change) {
+ return InstallOrUpdateExtension(id, path, expected_change);
+ }
+
void UninstallExtension(const std::string& extension_id);
// Wait for the number of visible page actions to change to |count|.
@@ -42,6 +53,9 @@ class ExtensionBrowserTest
FilePath test_data_dir_;
private:
+ bool InstallOrUpdateExtension(const std::string& id, const FilePath& path,
+ int expected_change);
+
bool WaitForExtensionHostsToLoad();
};