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> |