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

Unified Diff: chrome/test/data/extensions/api_test/webstore_private/silently_install.html

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/silently_install.html
diff --git a/chrome/test/data/extensions/api_test/webstore_private/silently_install.html b/chrome/test/data/extensions/api_test/webstore_private/silently_install.html
new file mode 100644
index 0000000000000000000000000000000000000000..49928cd1925adf87bb4476bb4b4ab34759380a0d
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/webstore_private/silently_install.html
@@ -0,0 +1,71 @@
+<script src="common.js"></script>
+<script>
+
+var extension1 = {
+ 'id': 'bmfoocgfinpmkmlbjhcbofejhkhlbchk',
+ 'manifest':
+ '{\
+ "name": "Extension Bundle 1",\
+ "version": "1",\
+ "permissions": [ "tabs" ]\
+ }'
+};
+
+var extension2 = {
+ 'id': 'mpneghmdnmaolkljkipbhaienajcflfe',
+ 'manifest':
+ '{\
+ "name": "Extension Bundle 2",\
+ "version": "1",\
+ "permissions": ["management", "http://google.com" ],\
+ "content_script": [{\
+ "matches": [ "http://www.example.com/*" ],\
+ "js": [ "content_script.js" ],\
+ "run_at": "document_start"\
+ }]\
+ }'
+};
+
+var extension3 = {
+ 'id': 'begfmnajjkbjdgmffnjaojchoncnmngg',
+ 'manifest':
+ '{\
+ "name": "Bundle App 2",\
+ "version": "1",\
+ "app": {\
+ "urls": [ "http://www.testapp2.com" ],\
+ "launch": { "web_url": "http://www.testapp2.com" }\
+ }\
+ }'
+};
+
+runTests([
+ function invalidID() {
+ var expectedError = "Invalid id";
+ chrome.webstorePrivate.silentlyInstall(
+ { 'id': 'dladmdjkfniedhfhcfoefgojhgaiaccc', 'manifest': getManifest() },
+ callbackFail(expectedError));
+ },
+
+ function successfulInstall() {
+ chrome.webstorePrivate.silentlyInstall(extension1, callbackPass(function() {
+ checkItemInstalled(
+ extension1.id,
+ callbackPass(function(result) { assertTrue(result); }));
+ }));
+
+ chrome.webstorePrivate.silentlyInstall(extension2, callbackPass(function() {
+ checkItemInstalled(
+ extension2.id,
+ callbackPass(function(result) { assertTrue(result); }));
+ chrome.webstorePrivate.silentlyInstall(
+ extension3, callbackPass(function() {
+ checkItemInstalled(
+ extension3.id,
+ callbackPass(function(result) { assertTrue(result); }));
+ }));
+ }));
+ }
+]);
+
+</script>
« no previous file with comments | « chrome/test/data/extensions/api_test/webstore_private/common.js ('k') | content/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698