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