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"); |
+} |