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

Unified Diff: chrome/browser/download/download_browsertest.cc

Issue 10399069: Reland 137540 - Disable off-store extension installs by default. Also get rid of ExtensionService::… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 93c9873c33313bb213aabba211c7c1b21ce1e762..d6e2d5ba41fb44dd3844e44d15be794dc1277aa2 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -40,6 +40,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/extensions/extension_switch_utils.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
@@ -1653,6 +1654,9 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, MAYBE_AutoOpen) {
// Download an extension. Expect a dangerous download warning.
// Deny the download.
IN_PROC_BROWSER_TEST_F(DownloadTest, CrxDenyInstall) {
+ if (!extensions::switch_utils::IsOffStoreInstallEnabled())
+ return;
+
GURL extension_url(URLRequestMockHTTPJob::GetMockUrl(kGoodCrxPath));
scoped_ptr<DownloadTestObserver> observer(
@@ -1677,6 +1681,9 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, CrxDenyInstall) {
// Download an extension. Expect a dangerous download warning.
// Allow the download, deny the install.
IN_PROC_BROWSER_TEST_F(DownloadTest, CrxInstallDenysPermissions) {
+ if (!extensions::switch_utils::IsOffStoreInstallEnabled())
+ return;
+
GURL extension_url(URLRequestMockHTTPJob::GetMockUrl(kGoodCrxPath));
// Install a mock install UI that simulates a user denying permission to
@@ -1707,6 +1714,9 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, CrxInstallDenysPermissions) {
// Download an extension. Expect a dangerous download warning.
// Allow the download, and the install.
IN_PROC_BROWSER_TEST_F(DownloadTest, CrxInstallAcceptPermissions) {
+ if (!extensions::switch_utils::IsOffStoreInstallEnabled())
+ return;
+
GURL extension_url(URLRequestMockHTTPJob::GetMockUrl(kGoodCrxPath));
// Install a mock install UI that simulates a user allowing permission to
@@ -1763,6 +1773,9 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, CrxInvalid) {
// Install a large (100kb) theme.
IN_PROC_BROWSER_TEST_F(DownloadTest, CrxLargeTheme) {
+ if (!extensions::switch_utils::IsOffStoreInstallEnabled())
+ return;
+
GURL extension_url(URLRequestMockHTTPJob::GetMockUrl(kLargeThemePath));
// Install a mock install UI that simulates a user allowing permission to
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.cc ('k') | chrome/browser/download/download_crx_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698