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

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

Issue 7488060: Add tests for CWS restriction of Nacl plugin invocation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
===================================================================
--- chrome/browser/extensions/extension_browsertest.cc (revision 95477)
+++ chrome/browser/extensions/extension_browsertest.cc (working copy)
@@ -214,19 +214,27 @@
}
};
+bool ExtensionBrowserTest::InstallExtensionFromWebstore(const FilePath& path,
+ int expected_change) {
+ return InstallOrUpdateExtension("", path, INSTALL_UI_TYPE_NONE,
+ expected_change, browser()->profile(),
+ true);
+}
+
bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id,
const FilePath& path,
InstallUIType ui_type,
int expected_change) {
return InstallOrUpdateExtension(id, path, ui_type, expected_change,
- browser()->profile());
+ browser()->profile(), false);
}
bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id,
const FilePath& path,
InstallUIType ui_type,
int expected_change,
- Profile* profile) {
+ Profile* profile,
+ bool from_webstore) {
ExtensionService* service = profile->GetExtensionService();
service->set_show_extensions_prompts(false);
size_t num_before = service->extensions()->size();
@@ -260,6 +268,7 @@
scoped_refptr<CrxInstaller> installer(
service->MakeCrxInstaller(install_ui));
installer->set_expected_id(id);
+ installer->set_is_gallery_install(from_webstore);
installer->InstallCrx(crx_path);
ui_test_utils::RunMessageLoop();
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_nacl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698