|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
4 */ |
|
5 |
|
6 // Disables security checking our updates which haven't been signed |
|
7 Services.prefs.setBoolPref("extensions.checkUpdateSecurity", false); |
|
8 |
|
9 var ADDONS = [ |
|
10 "test_bug470377_1", |
|
11 "test_bug470377_2", |
|
12 "test_bug470377_3", |
|
13 "test_bug470377_4", |
|
14 "test_bug470377_5", |
|
15 ]; |
|
16 |
|
17 Components.utils.import("resource://testing-common/httpd.js"); |
|
18 var server; |
|
19 |
|
20 function run_test() { |
|
21 do_test_pending(); |
|
22 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2"); |
|
23 |
|
24 server = new HttpServer(); |
|
25 server.registerDirectory("/", do_get_file("data/test_bug470377")); |
|
26 server.start(-1); |
|
27 |
|
28 startupManager(); |
|
29 AddonManager.checkCompatibility = false; |
|
30 |
|
31 installAllFiles([do_get_addon(a) for each (a in ADDONS)], function() { |
|
32 restartManager(); |
|
33 |
|
34 AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org", |
|
35 "bug470377_2@tests.mozilla.org", |
|
36 "bug470377_3@tests.mozilla.org", |
|
37 "bug470377_4@tests.mozilla.org", |
|
38 "bug470377_5@tests.mozilla.org"], |
|
39 function([a1, a2, a3, a4, a5]) { |
|
40 do_check_eq(a1, null); |
|
41 do_check_neq(a2, null); |
|
42 do_check_neq(a3, null); |
|
43 do_check_neq(a4, null); |
|
44 do_check_neq(a5, null); |
|
45 |
|
46 server.stop(do_test_finished); |
|
47 }); |
|
48 }, true); |
|
49 } |