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

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

Issue 339103002: Update the EphemeralAppLauncher for use by the webstorePrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self nit Created 6 years, 6 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_installer_test.cc
diff --git a/chrome/browser/extensions/webstore_installer_test.cc b/chrome/browser/extensions/webstore_installer_test.cc
index ff3db722597b6dc84f05ba578eee7d834542ff6d..7586a438711d4ed338e1a7dfc83e6cb9fd3527e5 100644
--- a/chrome/browser/extensions/webstore_installer_test.cc
+++ b/chrome/browser/extensions/webstore_installer_test.cc
@@ -52,6 +52,7 @@ WebstoreInstallerTest::WebstoreInstallerTest(
WebstoreInstallerTest::~WebstoreInstallerTest() {}
void WebstoreInstallerTest::SetUpCommandLine(CommandLine* command_line) {
+ ExtensionBrowserTest::SetUpCommandLine(command_line);
// We start the test server now instead of in
// SetUpInProcessBrowserTestFixture so that we can get its port number.
ASSERT_TRUE(test_server()->Start());
@@ -79,7 +80,7 @@ void WebstoreInstallerTest::SetUpInProcessBrowserTestFixture() {
}
void WebstoreInstallerTest::SetUpOnMainThread() {
- InProcessBrowserTest::SetUpOnMainThread();
+ ExtensionBrowserTest::SetUpOnMainThread();
ASSERT_TRUE(download_directory_.CreateUniqueTempDir());
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
browser()->profile());
@@ -132,3 +133,14 @@ void WebstoreInstallerTest::RunTestAsync(
browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame()->
ExecuteJavaScript(base::UTF8ToUTF16(script));
}
+
+void WebstoreInstallerTest::AutoAcceptInstall() {
+ // TODO(tmdiep): Refactor and remove the use of the command line flag.
asargent_no_longer_on_chrome 2014/06/18 20:25:10 You can link to crbug.com/357774 here
tmdiep 2014/06/19 01:48:36 Done.
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
+}
+
+void WebstoreInstallerTest::AutoCancelInstall() {
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
+}

Powered by Google App Engine
This is Rietveld 408576698