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

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

Issue 8430033: Adds a webstorePrivate method for silently installing extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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 d7fbf65a7050d69733c5cb82cea3d79e1cc93996..ec28b22c9393bd5c133c82343afd3e59e1849d20 100644
--- a/chrome/browser/extensions/extension_webstore_private_apitest.cc
+++ b/chrome/browser/extensions/extension_webstore_private_apitest.cc
@@ -20,6 +20,9 @@
namespace {
+const char* kExtensionID = "enfkhcelefdadlmkffamgdlgplcionje";
+const char* kAppID = "iladmdjkfniedhfhcfoefgojhgaiaccc";
+
class WebstoreInstallListener : public WebstoreInstaller::Delegate {
public:
WebstoreInstallListener()
@@ -170,7 +173,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest,
ASSERT_TRUE(RunInstallTest("app_install_bubble.html", "app.crx"));
listener.Wait();
ASSERT_TRUE(listener.received_success());
- ASSERT_EQ("iladmdjkfniedhfhcfoefgojhgaiaccc", listener.id());
+ ASSERT_EQ(kAppID, listener.id());
}
// Tests using the iconUrl parameter to the install function.
@@ -178,3 +181,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest,
IconUrl) {
ASSERT_TRUE(RunInstallTest("icon_url.html", "extension.crx"));
}
+
+// Tests using silentlyInstall to install extensions.
+IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, SilentlyInstall) {
+ WebstorePrivateApi::SetTrustedIDForTesting(kExtensionID);
+ ASSERT_TRUE(RunInstallTest("silently_install.html", "extension.crx"));
+}

Powered by Google App Engine
This is Rietveld 408576698