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

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: Rebase again 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..cf8b82e5a2dcab842f54e3c08d5e9d68ab48dbde 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,15 @@ 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.
+ // See crbug.com/357774.
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
+}
+
+void WebstoreInstallerTest::AutoCancelInstall() {
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
+}
« no previous file with comments | « chrome/browser/extensions/webstore_installer_test.h ('k') | chrome/browser/extensions/webstore_standalone_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698