1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/extensions/test/xpcshell/test_isDebuggable.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 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 +var ADDONS = [ 1.10 + "test_bootstrap2_1", // restartless addon 1.11 + "test_bootstrap1_4", // old-school addon 1.12 + "test_jetpack" // sdk addon 1.13 +]; 1.14 + 1.15 +var IDS = [ 1.16 + "bootstrap1@tests.mozilla.org", 1.17 + "bootstrap2@tests.mozilla.org", 1.18 + "jetpack@tests.mozilla.org" 1.19 +]; 1.20 + 1.21 +function run_test() { 1.22 + do_test_pending(); 1.23 + 1.24 + createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2"); 1.25 + 1.26 + startupManager(); 1.27 + AddonManager.checkCompatibility = false; 1.28 + 1.29 + installAllFiles(ADDONS.map(do_get_addon), function () { 1.30 + restartManager(); 1.31 + 1.32 + AddonManager.getAddonsByIDs(IDS, function([a1, a2, a3]) { 1.33 + do_check_eq(a1.isDebuggable, false); 1.34 + do_check_eq(a2.isDebuggable, true); 1.35 + do_check_eq(a3.isDebuggable, true); 1.36 + do_test_finished(); 1.37 + }); 1.38 + }, true); 1.39 +}