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

Side by Side 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: remove dcheck 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <script src="common.js"></script>
2 <script>
3
4 var extension1 = {
5 'id': 'bmfoocgfinpmkmlbjhcbofejhkhlbchk',
6 'manifest':
7 '{\
8 "name": "Extension Bundle 1",\
9 "version": "1",\
10 "permissions": [ "tabs" ]\
11 }'
12 };
13
14 var extension2 = {
15 'id': 'mpneghmdnmaolkljkipbhaienajcflfe',
16 'manifest':
17 '{\
18 "name": "Extension Bundle 2",\
19 "version": "1",\
20 "permissions": ["management", "http://google.com" ],\
21 "content_script": [{\
22 "matches": [ "http://www.example.com/*" ],\
23 "js": [ "content_script.js" ],\
24 "run_at": "document_start"\
25 }]\
26 }'
27 };
28
29 var extension3 = {
30 'id': 'begfmnajjkbjdgmffnjaojchoncnmngg',
31 'manifest':
32 '{\
33 "name": "Bundle App 2",\
34 "version": "1",\
35 "app": {\
36 "urls": [ "http://www.testapp2.com" ],\
37 "launch": { "web_url": "http://www.testapp2.com" }\
38 }\
39 }'
40 };
41
42 runTests([
43 function invalidID() {
44 var expectedError = "Invalid id";
45 chrome.webstorePrivate.silentlyInstall(
46 { 'id': 'dladmdjkfniedhfhcfoefgojhgaiaccc', 'manifest': getManifest() },
47 callbackFail(expectedError));
48 },
49
50 function successfulInstall() {
51 chrome.webstorePrivate.silentlyInstall(extension1, callbackPass(function() {
52 checkItemInstalled(
53 extension1.id,
54 callbackPass(function(result) { assertTrue(result); }));
55 }));
56
57 chrome.webstorePrivate.silentlyInstall(extension2, callbackPass(function() {
Mihai Parparita -not on Chrome 2011/11/02 21:05:09 Perhaps one of these should be nested in the callb
jstritar 2011/11/02 21:20:49 Done.
58 checkItemInstalled(
59 extension2.id,
60 callbackPass(function(result) { assertTrue(result); }));
61 }));
62
63 chrome.webstorePrivate.silentlyInstall(extension3, callbackPass(function() {
64 checkItemInstalled(
65 extension3.id,
66 callbackPass(function(result) { assertTrue(result); }));
67 }));
68 }
69 ]);
70
71 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698