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

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

Issue 10750010: Add an installType property to the management API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Forgot to remove param from LoadExtensionWithOptions (sorry) Created 8 years, 5 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
Index: chrome/browser/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 32d8a4d874021e09146ff9114d030f1a01912de2..e5cd7f5e131208bc475406c515d40bd10337fa4f 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -134,7 +134,6 @@ const Extension* ExtensionBrowserTest::LoadExtensionWithOptions(
chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(browser()->profile()));
CHECK(service->AllowFileAccess(extension));
-
if (!fileaccess_enabled) {
service->SetAllowFileAccess(extension, fileaccess_enabled);
load_signal.Wait();
@@ -265,7 +264,8 @@ const Extension* ExtensionBrowserTest::InstallExtensionFromWebstore(
const FilePath& path,
int expected_change) {
return InstallOrUpdateExtension("", path, INSTALL_UI_TYPE_NONE,
- expected_change, browser(), true);
+ expected_change, Extension::INTERNAL,
+ browser(), true);
}
const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
@@ -274,7 +274,28 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
InstallUIType ui_type,
int expected_change) {
return InstallOrUpdateExtension(id, path, ui_type, expected_change,
- browser(), false);
+ Extension::INTERNAL, browser(), false);
+}
+
+const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
+ const std::string& id,
+ const FilePath& path,
+ InstallUIType ui_type,
+ int expected_change,
+ Browser* browser,
+ bool from_webstore) {
+ return InstallOrUpdateExtension(id, path, ui_type, expected_change,
+ Extension::INTERNAL, browser, from_webstore);
+}
+
+const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
+ const std::string& id,
+ const FilePath& path,
+ InstallUIType ui_type,
+ int expected_change,
+ Extension::Location install_source) {
+ return InstallOrUpdateExtension(id, path, ui_type, expected_change,
+ install_source, browser(), false);
}
const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
@@ -282,6 +303,7 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
const FilePath& path,
InstallUIType ui_type,
int expected_change,
+ Extension::Location install_source,
Browser* browser,
bool from_webstore) {
ExtensionService* service = browser->profile()->GetExtensionService();
@@ -316,6 +338,7 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
extensions::CrxInstaller::Create(service, install_ui));
installer->set_expected_id(id);
installer->set_is_gallery_install(from_webstore);
+ installer->set_install_source(install_source);
if (!from_webstore) {
installer->set_off_store_install_allow_reason(
extensions::CrxInstaller::OffStoreInstallAllowedInTest);
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_function_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698