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

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

Issue 617833003: Remove --install-from-webstore and --limited-install-from-webstore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/extensions/startup_helper.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 82d3b9681cf4d4629a5096e8e2f1e70cd878b5c7..ea9d965a486eb568acf50255b2b3c46807e94a57 100644
--- a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
+++ b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
@@ -290,55 +290,14 @@ class CommandLineWebstoreInstall
int browser_open_count_;
};
-IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Accept) {
+IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, CannotInstallNonEphemeral) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitchASCII(
- switches::kInstallFromWebstore, kTestExtensionId);
+ switches::kInstallEphemeralAppFromWebstore, kTestExtensionId);
ExtensionInstallPrompt::g_auto_confirm_for_tests =
ExtensionInstallPrompt::ACCEPT;
extensions::StartupHelper helper;
- EXPECT_TRUE(helper.InstallFromWebstore(*command_line, browser()->profile()));
- EXPECT_TRUE(saw_install());
- EXPECT_EQ(0, browser_open_count());
-}
-
-IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Cancel) {
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- command_line->AppendSwitchASCII(
- switches::kInstallFromWebstore, kTestExtensionId);
- ExtensionInstallPrompt::g_auto_confirm_for_tests =
- ExtensionInstallPrompt::CANCEL;
- extensions::StartupHelper helper;
- EXPECT_FALSE(helper.InstallFromWebstore(*command_line, browser()->profile()));
+ EXPECT_FALSE(helper.InstallEphemeralApp(*command_line, browser()->profile()));
EXPECT_FALSE(saw_install());
EXPECT_EQ(0, browser_open_count());
}
-
-IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, LimitedAccept) {
- extensions::StartupHelper helper;
-
- // Small test of "WebStoreIdFromLimitedInstallCmdLine" which made more
- // sense together with the rest of the test for "LimitedInstallFromWebstore".
- base::CommandLine command_line_test1(base::CommandLine::NO_PROGRAM);
- command_line_test1.AppendSwitchASCII(switches::kLimitedInstallFromWebstore,
- "1");
- EXPECT_EQ("nckgahadagoaajjgafhacjanaoiihapd",
- helper.WebStoreIdFromLimitedInstallCmdLine(command_line_test1));
-
- base::CommandLine command_line_test2(base::CommandLine::NO_PROGRAM);
- command_line_test1.AppendSwitchASCII(switches::kLimitedInstallFromWebstore,
- "2");
- EXPECT_EQ(kTestExtensionId,
- helper.WebStoreIdFromLimitedInstallCmdLine(command_line_test1));
-
- // Now, on to the real test for LimitedInstallFromWebstore.
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- command_line->AppendSwitchASCII(
- switches::kLimitedInstallFromWebstore, "2");
- helper.LimitedInstallFromWebstore(*command_line, browser()->profile(),
- base::MessageLoop::QuitWhenIdleClosure());
- base::MessageLoop::current()->Run();
-
- EXPECT_TRUE(saw_install());
- EXPECT_EQ(0, browser_open_count());
-}
« no previous file with comments | « chrome/browser/extensions/startup_helper.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698