toolkit/mozapps/extensions/test/xpcshell/test_bug470377_1.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:dd8cfb3a83a8
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(PREF_EM_CHECK_UPDATE_SECURITY, false);
8 Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false);
9
10 var ADDONS = [
11 "test_bug470377_1",
12 "test_bug470377_2",
13 "test_bug470377_3",
14 "test_bug470377_4",
15 "test_bug470377_5",
16 ];
17
18 Components.utils.import("resource://testing-common/httpd.js");
19 var server;
20
21 function run_test() {
22 do_test_pending();
23 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2");
24
25 server = new HttpServer();
26 server.registerDirectory("/", do_get_file("data/test_bug470377"));
27 server.start(-1);
28
29 startupManager();
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 }

mercurial