toolkit/mozapps/extensions/test/xpcshell/test_bug470377_2.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.

     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  */
     6 // Disables security checking our updates which haven't been signed
     7 Services.prefs.setBoolPref("extensions.checkUpdateSecurity", false);
     9 var ADDONS = [
    10   "test_bug470377_1",
    11   "test_bug470377_2",
    12   "test_bug470377_3",
    13   "test_bug470377_4",
    14   "test_bug470377_5",
    15 ];
    17 Components.utils.import("resource://testing-common/httpd.js");
    18 var server;
    20 function run_test() {
    21   do_test_pending();
    22   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2");
    24   server = new HttpServer();
    25   server.registerDirectory("/", do_get_file("data/test_bug470377"));
    26   server.start(-1);
    28   startupManager();
    29   AddonManager.checkCompatibility = false;
    31   installAllFiles([do_get_addon(a) for each (a in ADDONS)], function() {
    32     restartManager();
    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);
    46       server.stop(do_test_finished);
    47     });
    48   }, true);
    49 }

mercurial