OLD | NEW |
| (Empty) |
1 <!-- | |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this | |
3 * source code is governed by a BSD-style license that can be found in the | |
4 * LICENSE file. | |
5 --> | |
6 <script src="common.js"></script> | |
7 <script> | |
8 | |
9 var extension1 = { | |
10 'id': 'bmfoocgfinpmkmlbjhcbofejhkhlbchk', | |
11 'manifest': getManifest('bundle/extension1.json') | |
12 }; | |
13 | |
14 var extension2 = { | |
15 'id': 'mpneghmdnmaolkljkipbhaienajcflfe', | |
16 'manifest': getManifest('bundle/extension2.json') | |
17 }; | |
18 | |
19 var extension3 = { | |
20 'id': 'begfmnajjkbjdgmffnjaojchoncnmngg', | |
21 'manifest': getManifest('bundle/app2.json') | |
22 }; | |
23 | |
24 runTests([ | |
25 function invalidID() { | |
26 var expectedError = "Invalid id"; | |
27 chrome.webstorePrivate.silentlyInstall( | |
28 { 'id': 'dladmdjkfniedhfhcfoefgojhgaiaccc', 'manifest': getManifest() }, | |
29 callbackFail(expectedError)); | |
30 }, | |
31 | |
32 function successfulInstall() { | |
33 chrome.webstorePrivate.silentlyInstall(extension1, callbackPass(function() { | |
34 checkItemInstalled( | |
35 extension1.id, | |
36 callbackPass(function(result) { assertTrue(result); })); | |
37 })); | |
38 | |
39 chrome.webstorePrivate.silentlyInstall(extension2, callbackPass(function() { | |
40 checkItemInstalled( | |
41 extension2.id, | |
42 callbackPass(function(result) { assertTrue(result); })); | |
43 chrome.webstorePrivate.silentlyInstall( | |
44 extension3, callbackPass(function() { | |
45 checkItemInstalled( | |
46 extension3.id, | |
47 callbackPass(function(result) { assertTrue(result); })); | |
48 })); | |
49 })); | |
50 } | |
51 ]); | |
52 | |
53 </script> | |
OLD | NEW |