| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this | 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 | 3 * source code is governed by a BSD-style license that can be found in the |
| 4 * LICENSE file. | 4 * LICENSE file. |
| 5 --> | 5 --> |
| 6 <script src="common.js"></script> | 6 <script src="common.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 var bundleItems = [ | 9 var bundleItems = [ |
| 10 { | 10 { |
| 11 id: 'begfmnajjkbjdgmffnjaojchoncnmngg', | 11 id: 'begfmnajjkbjdgmffnjaojchoncnmngg', |
| 12 manifest: getManifest('bundle/app1.json'), | 12 manifest: getManifest('bundle/app1.json'), |
| 13 localizedName: 'app.1' | 13 localizedName: 'app.1' |
| 14 }, | 14 }, |
| 15 { | 15 { |
| 16 id: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', // Invalid CRX. | 16 id: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', // Invalid CRX. |
| 17 manifest: getManifest('bundle/app2.json'), | 17 manifest: getManifest('bundle/app2.json'), |
| 18 localizedName: 'app.2' | 18 localizedName: 'app.2' |
| 19 }, | 19 }, |
| 20 { | 20 { |
| 21 id: 'bmfoocgfinpmkmlbjhcbofejhkhlbchk', // Wrong manifest. | 21 id: 'bmfoocgfinpmkmlbjhcbofejhkhlbchk', // Wrong manifest. |
| 22 manifest: getManifest('bundle/extension2.json'), | 22 manifest: getManifest('bundle/extension2.json'), |
| 23 localizedName: 'extension.1' | 23 localizedName: 'extension.1' |
| 24 }, | 24 }, |
| 25 { | 25 { |
| 26 id: 'pkapffpjmiilhlhbibjhamlmdhfneidj', | 26 id: 'pkapffpjmiilhlhbibjhamlmdhfneidj', // No CRX, 404. |
| 27 manifest: getManifest('bundle/extension2.json'), | 27 manifest: getManifest('bundle/extension2.json'), |
| 28 localizedName: 'extension.2' | 28 localizedName: 'extension.2' |
| 29 } | 29 } |
| 30 ]; | 30 ]; |
| 31 | 31 |
| 32 var installed = [ | 32 var installed = [ |
| 33 'begfmnajjkbjdgmffnjaojchoncnmngg', | 33 'begfmnajjkbjdgmffnjaojchoncnmngg' |
| 34 'pkapffpjmiilhlhbibjhamlmdhfneidj' | |
| 35 ]; | 34 ]; |
| 36 | 35 |
| 37 var failed = [ | 36 var failed = [ |
| 38 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', | 37 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', |
| 39 'bmfoocgfinpmkmlbjhcbofejhkhlbchk' | 38 'bmfoocgfinpmkmlbjhcbofejhkhlbchk', |
| 39 'pkapffpjmiilhlhbibjhamlmdhfneidj' |
| 40 ]; | 40 ]; |
| 41 | 41 |
| 42 runTests([ | 42 runTests([ |
| 43 function successfulInstall() { | 43 function successfulInstall() { |
| 44 chrome.webstorePrivate.installBundle( | 44 chrome.webstorePrivate.installBundle( |
| 45 bundleItems, callbackPass(function() { | 45 bundleItems, callbackPass(function() { |
| 46 installed.forEach(function(id) { | 46 installed.forEach(function(id) { |
| 47 checkItemInstalled( | 47 checkItemInstalled( |
| 48 id, | 48 id, |
| 49 callbackPass(function(result) { assertTrue(result); })); | 49 callbackPass(function(result) { assertTrue(result); })); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 64 callbackPass(function(result) { assertFalse(result); })); | 64 callbackPass(function(result) { assertFalse(result); })); |
| 65 })); | 65 })); |
| 66 }, | 66 }, |
| 67 | 67 |
| 68 function noItems() { | 68 function noItems() { |
| 69 chrome.webstorePrivate.installBundle([], callbackFail("unknown_error")); | 69 chrome.webstorePrivate.installBundle([], callbackFail("unknown_error")); |
| 70 } | 70 } |
| 71 ]); | 71 ]); |
| 72 | 72 |
| 73 </script> | 73 </script> |
| OLD | NEW |