Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Unified Diff: chrome/browser/extensions/extension_browsertest.h

Issue 5543001: Tests for incognito app install, plus some cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make PackExtension return FilePath and change ASSERTs to ADD_FAILURES Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_browsertest.h
diff --git a/chrome/browser/extensions/extension_browsertest.h b/chrome/browser/extensions/extension_browsertest.h
index 9b7f5f00efdee22ff6e6cd10bbc62e295770ca26..82d37f12a3dacdf6fb032395bb077c48eb2b3712 100644
--- a/chrome/browser/extensions/extension_browsertest.h
+++ b/chrome/browser/extensions/extension_browsertest.h
@@ -29,6 +29,10 @@ class ExtensionBrowserTest
// Same as above, but enables the extension in incognito mode first.
bool LoadExtensionIncognito(const FilePath& path);
+ // Pack the extension in |dir_path| into a crx file and return its path.
+ // Return an empty FilePath if there were errors.
+ FilePath PackExtension(const FilePath& dir_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
@@ -52,6 +56,12 @@ class ExtensionBrowserTest
return InstallOrUpdateExtension("", path, INSTALL_UI_TYPE_NORMAL,
expected_change);
}
+ bool InstallExtensionWithUIAutoConfirm(const FilePath& path,
+ int expected_change,
+ Profile* profile) {
+ return InstallOrUpdateExtension("", path, INSTALL_UI_TYPE_AUTO_CONFIRM,
+ expected_change, profile);
+ }
// Begins install process but simulates a user cancel.
bool StartInstallButCancel(const FilePath& path) {
@@ -109,11 +119,16 @@ class ExtensionBrowserTest
INSTALL_UI_TYPE_NONE,
INSTALL_UI_TYPE_CANCEL,
INSTALL_UI_TYPE_NORMAL,
+ INSTALL_UI_TYPE_AUTO_CONFIRM,
};
bool InstallOrUpdateExtension(const std::string& id, const FilePath& path,
InstallUIType ui_type,
int expected_change);
+ bool InstallOrUpdateExtension(const std::string& id, const FilePath& path,
+ InstallUIType ui_type,
+ int expected_change,
+ Profile* profile);
bool LoadExtensionImpl(const FilePath& path, bool incognito_enabled);
bool WaitForExtensionHostsToLoad();
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698