michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: // Disables security checking our updates which haven't been signed michael@0: Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false); michael@0: Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, true); michael@0: michael@0: var ADDONS = [ michael@0: "test_bug470377_1", michael@0: "test_bug470377_2", michael@0: "test_bug470377_3", michael@0: "test_bug470377_4", michael@0: "test_bug470377_5", michael@0: ]; michael@0: michael@0: Components.utils.import("resource://testing-common/httpd.js"); michael@0: var server; michael@0: michael@0: function run_test() { michael@0: do_test_pending(); michael@0: createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2"); michael@0: michael@0: server = new HttpServer(); michael@0: server.registerDirectory("/", do_get_file("data/test_bug470377")); michael@0: server.start(-1); michael@0: michael@0: startupManager(); michael@0: michael@0: installAllFiles([do_get_addon(a) for each (a in ADDONS)], function() { michael@0: restartManager(); michael@0: michael@0: AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org", michael@0: "bug470377_2@tests.mozilla.org", michael@0: "bug470377_3@tests.mozilla.org", michael@0: "bug470377_4@tests.mozilla.org", michael@0: "bug470377_5@tests.mozilla.org"], michael@0: function([a1, a2, a3, a4, a5]) { michael@0: do_check_eq(a1, null); michael@0: do_check_eq(a2, null); michael@0: do_check_eq(a3, null); michael@0: do_check_neq(a4, null); michael@0: do_check_neq(a5, null); michael@0: michael@0: server.stop(do_test_finished); michael@0: }); michael@0: }, true); michael@0: }