toolkit/mozapps/extensions/test/xpcshell/test_isDebuggable.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 var ADDONS = [
     7   "test_bootstrap2_1", // restartless addon
     8   "test_bootstrap1_4", // old-school addon
     9   "test_jetpack"       // sdk addon
    10 ];
    12 var IDS = [
    13   "bootstrap1@tests.mozilla.org",
    14   "bootstrap2@tests.mozilla.org",
    15   "jetpack@tests.mozilla.org"
    16 ];
    18 function run_test() {
    19   do_test_pending();
    21   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2");
    23   startupManager();
    24   AddonManager.checkCompatibility = false;
    26   installAllFiles(ADDONS.map(do_get_addon), function () {
    27     restartManager();
    29     AddonManager.getAddonsByIDs(IDS, function([a1, a2, a3]) {
    30       do_check_eq(a1.isDebuggable, false);
    31       do_check_eq(a2.isDebuggable, true);
    32       do_check_eq(a3.isDebuggable, true);
    33       do_test_finished();
    34     });
    35   }, true);
    36 }

mercurial