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

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

Issue 410683008: Remove kAppsGalleryInstallAutoConfirmForTests switch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/webstore_startup_installer_browsertest.cc
diff --git a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
index 9d5a66551ed4703d6bbdd9e2e838148bcc2df366..36478f2a3676c2f303ee832032185dd6118b5f5c 100644
--- a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
+++ b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/command_line.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/startup_helper.h"
@@ -55,8 +56,8 @@ class WebstoreStartupInstallerTest : public WebstoreInstallerTest {
};
IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, Install) {
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::ACCEPT;
ui_test_utils::NavigateToURL(
browser(), GenerateTestServerUrl(kAppDomain, "install.html"));
@@ -71,8 +72,8 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, Install) {
IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest,
InstallNotAllowedFromNonVerifiedDomains) {
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::CANCEL;
ui_test_utils::NavigateToURL(
browser(),
GenerateTestServerUrl(kNonAppDomain, "install_non_verified_domain.html"));
@@ -91,8 +92,8 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, FindLink) {
// Flakes on all platforms: http://crbug.com/95713, http://crbug.com/229947
IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest,
DISABLED_ArgumentValidation) {
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::CANCEL;
// Each of these tests has to run separately, since one page/tab can
// only have one in-progress install request. These tests don't all pass
@@ -108,8 +109,8 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest,
}
IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, MultipleInstallCalls) {
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::CANCEL;
ui_test_utils::NavigateToURL(
browser(),
@@ -118,8 +119,8 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, MultipleInstallCalls) {
}
IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallNotSupported) {
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::CANCEL;
ui_test_utils::NavigateToURL(
browser(),
GenerateTestServerUrl(kAppDomain, "install_not_supported.html"));
@@ -138,8 +139,8 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallNotSupported) {
// Regression test for http://crbug.com/144991.
IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallFromHostedApp) {
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::ACCEPT;
const GURL kInstallUrl = GenerateTestServerUrl(kAppDomain, "install.html");
@@ -190,8 +191,8 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerSupervisedUsersTest,
return;
#endif
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::ACCEPT;
ui_test_utils::NavigateToURL(
browser(), GenerateTestServerUrl(kAppDomain, "install_prohibited.html"));
@@ -226,8 +227,8 @@ class WebstoreStartupInstallUnpackFailureTest
IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallUnpackFailureTest,
WebstoreStartupInstallUnpackFailureTest) {
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::ACCEPT;
ui_test_utils::NavigateToURL(browser(),
GenerateTestServerUrl(kAppDomain, "install_unpack_failure.html"));
@@ -285,8 +286,8 @@ IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Accept) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitchASCII(
switches::kInstallFromWebstore, kTestExtensionId);
- command_line->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::ACCEPT;
extensions::StartupHelper helper;
EXPECT_TRUE(helper.InstallFromWebstore(*command_line, browser()->profile()));
EXPECT_TRUE(saw_install());
@@ -297,8 +298,8 @@ IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Cancel) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitchASCII(
switches::kInstallFromWebstore, kTestExtensionId);
- command_line->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::CANCEL;
extensions::StartupHelper helper;
EXPECT_FALSE(helper.InstallFromWebstore(*command_line, browser()->profile()));
EXPECT_FALSE(saw_install());
« no previous file with comments | « chrome/browser/extensions/webstore_installer_test.cc ('k') | chrome/browser/infobars/infobars_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698