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

Unified Diff: chrome/test/data/extensions/api_test/webstore_private/common.js

Issue 8430033: Adds a webstorePrivate method for silently installing extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mihai Created 9 years, 1 month 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/test/data/extensions/api_test/webstore_private/common.js
diff --git a/chrome/test/data/extensions/api_test/webstore_private/common.js b/chrome/test/data/extensions/api_test/webstore_private/common.js
index 358ced02e25d7aa45c432dd3eeb52cbb3fd57236..17025a42bebc09fd2291355c05e466cdfa9d3165 100644
--- a/chrome/test/data/extensions/api_test/webstore_private/common.js
+++ b/chrome/test/data/extensions/api_test/webstore_private/common.js
@@ -10,22 +10,29 @@ var appId = "iladmdjkfniedhfhcfoefgojhgaiaccc";
var assertEq = chrome.test.assertEq;
var assertNoLastError = chrome.test.assertNoLastError;
+var assertTrue = chrome.test.assertTrue;
var callbackFail = chrome.test.callbackFail;
var callbackPass = chrome.test.callbackPass;
var listenOnce = chrome.test.listenOnce;
var runTests = chrome.test.runTests;
var succeed = chrome.test.succeed;
-// Calls |callback| with true/false indicating whether an item with an id of
-// extensionId is installed.
-function checkInstalled(callback) {
+// Calls |callback| with true/false indicating whether an item with the |id|
+// is installed.
+function checkItemInstalled(id, callback) {
chrome.management.getAll(function(extensions) {
callback(extensions.some(function(ext) {
- return ext.id == extensionId;
+ return ext.id == id;
}));
});
}
+// Calls |callback| with true/false indicating whether an item with an id of
+// extensionId is installed.
+function checkInstalled(callback) {
+ checkItemInstalled(extensionId, callback);
+}
+
var cachedIcon = null;
var img = null;

Powered by Google App Engine
This is Rietveld 408576698