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

Unified Diff: chrome/browser/extensions/extension_service_unittest.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/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index f5c9d9a6499b111dcd80511145cd760ae9c99cdf..db895af8162de2b5b1e0863a7d895eabaf551a19 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -2796,9 +2796,8 @@ TEST_F(ExtensionServiceTest, LoadExtensionsWithPlugins) {
service()->set_show_extensions_prompts(true);
// Start by canceling any install prompts.
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests,
- "cancel");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::CANCEL;
// The extension that has a plugin should not install.
extensions::UnpackedInstaller::Create(service())
@@ -2821,9 +2820,8 @@ TEST_F(ExtensionServiceTest, LoadExtensionsWithPlugins) {
EXPECT_TRUE(registry()->enabled_extensions().Contains(good2));
// The plugin extension should install if we accept the dialog.
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests,
- "accept");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::ACCEPT;
ExtensionErrorReporter::GetInstance()->ClearErrors();
extensions::UnpackedInstaller::Create(service())
@@ -2846,9 +2844,8 @@ TEST_F(ExtensionServiceTest, LoadExtensionsWithPlugins) {
// We should be able to reload the extension without getting another prompt.
loaded_.clear();
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAppsGalleryInstallAutoConfirmForTests,
- "cancel");
+ ExtensionInstallPrompt::g_auto_confirm_for_tests =
+ ExtensionInstallPrompt::CANCEL;
service()->ReloadExtension(good1);
base::RunLoop().RunUntilIdle();
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.cc ('k') | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698