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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial