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

Unified Diff: chrome/browser/extensions/extension_webstore_private_apitest.cc

Issue 10010038: Do not show the install prompt for themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/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);

Powered by Google App Engine
This is Rietveld 408576698