| Index: chrome/browser/extensions/extension_webstore_private_apitest.cc
|
| diff --git a/chrome/browser/extensions/extension_webstore_private_apitest.cc b/chrome/browser/extensions/extension_webstore_private_apitest.cc
|
| index 75b5104eb8dec8b66f8e20e0f4344d27f33dfae3..a3ba3f2cf10938080f9fb1acb0d4aeba8d1b2564 100644
|
| --- a/chrome/browser/extensions/extension_webstore_private_apitest.cc
|
| +++ b/chrome/browser/extensions/extension_webstore_private_apitest.cc
|
| @@ -85,14 +85,12 @@ class WebstoreInstallListener : public WebstoreInstaller::Delegate {
|
| } // namespace
|
|
|
| // A base class for tests below.
|
| -class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
|
| +class ExtensionNoConfirmWebstorePrivateApiTest : public ExtensionApiTest {
|
| public:
|
| void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
|
| ExtensionApiTest::SetUpCommandLine(command_line);
|
| command_line->AppendSwitchASCII(
|
| switches::kAppsGalleryURL, "http://www.example.com");
|
| - command_line->AppendSwitchASCII(
|
| - switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
|
| }
|
|
|
| void SetUpInProcessBrowserTestFixture() OVERRIDE {
|
| @@ -135,6 +133,16 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
|
| }
|
| };
|
|
|
| +class ExtensionWebstorePrivateApiTest :
|
| + public ExtensionNoConfirmWebstorePrivateApiTest {
|
| + public:
|
| + void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
|
| + ExtensionNoConfirmWebstorePrivateApiTest::SetUpCommandLine(command_line);
|
| + command_line->AppendSwitchASCII(
|
| + switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
|
| + }
|
| +};
|
| +
|
| class ExtensionWebstorePrivateBundleTest
|
| : public ExtensionWebstorePrivateApiTest {
|
| public:
|
| @@ -329,6 +337,17 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, BeginInstall) {
|
| EXPECT_EQ(browser()->profile(), approval->profile);
|
| }
|
|
|
| +// Tests that themes are installed without an install prompt.
|
| +IN_PROC_BROWSER_TEST_F(ExtensionNoConfirmWebstorePrivateApiTest,
|
| + InstallTheme) {
|
| + WebstoreInstallListener listener;
|
| + WebstorePrivateApi::SetWebstoreInstallerDelegateForTesting(&listener);
|
| + ASSERT_TRUE(RunInstallTest("theme.html", "../../theme.crx"));
|
| + listener.Wait();
|
| + ASSERT_TRUE(listener.received_success());
|
| + ASSERT_EQ("iamefpfkojoapidjnbafmgkgncegbkad", listener.id());
|
| +}
|
| +
|
| // Tests using silentlyInstall to install extensions.
|
| IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateBundleTest, SilentlyInstall) {
|
| WebstorePrivateApi::SetTrustTestIDsForTesting(true);
|
|
|