| 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..6115d10bf5d513ae6a4066b893e029b129623092 100644
|
| --- a/chrome/browser/extensions/extension_webstore_private_apitest.cc
|
| +++ b/chrome/browser/extensions/extension_webstore_private_apitest.cc
|
| @@ -135,6 +135,21 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
|
| }
|
| };
|
|
|
| +// The same as ExtensionWebstorePrivateApiTest except it uses the default
|
| +// install prompt behavior.
|
| +class ExtensionNoConfirmWebstorePrivateApiTest
|
| + : public ExtensionWebstorePrivateApiTest {
|
| + public:
|
| + void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
|
| + // We set this switch here to supercede the value set in
|
| + // ExtensionWebstorePrivateApiTest (you can't easily remove switches).
|
| + command_line->AppendSwitchASCII(
|
| + switches::kAppsGalleryInstallAutoConfirmForTests, "default");
|
| +
|
| + ExtensionWebstorePrivateApiTest::SetUpCommandLine(command_line);
|
| + }
|
| +};
|
| +
|
| class ExtensionWebstorePrivateBundleTest
|
| : public ExtensionWebstorePrivateApiTest {
|
| public:
|
| @@ -329,6 +344,16 @@ 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);
|
|
|