1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + */ 1.8 + 1.9 +// Disables security checking our updates which haven't been signed 1.10 +Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false); 1.11 +Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false); 1.12 + 1.13 +var ADDONS = [ 1.14 + "test_bug470377_1", 1.15 + "test_bug470377_2", 1.16 + "test_bug470377_3", 1.17 + "test_bug470377_4", 1.18 + "test_bug470377_5", 1.19 +]; 1.20 + 1.21 +Components.utils.import("resource://testing-common/httpd.js"); 1.22 +var server; 1.23 + 1.24 +function run_test() { 1.25 + do_test_pending(); 1.26 + createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2"); 1.27 + 1.28 + server = new HttpServer(); 1.29 + server.registerDirectory("/", do_get_file("data/test_bug470377")); 1.30 + server.start(-1); 1.31 + 1.32 + startupManager(); 1.33 + 1.34 + installAllFiles([do_get_addon(a) for each (a in ADDONS)], function() { 1.35 + restartManager(); 1.36 + 1.37 + AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org", 1.38 + "bug470377_2@tests.mozilla.org", 1.39 + "bug470377_3@tests.mozilla.org", 1.40 + "bug470377_4@tests.mozilla.org", 1.41 + "bug470377_5@tests.mozilla.org"], 1.42 + function([a1, a2, a3, a4, a5]) { 1.43 + do_check_eq(a1, null); 1.44 + do_check_neq(a2, null); 1.45 + do_check_neq(a3, null); 1.46 + do_check_neq(a4, null); 1.47 + do_check_neq(a5, null); 1.48 + 1.49 + server.stop(do_test_finished); 1.50 + }); 1.51 + }, true); 1.52 +}