michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: // This verifies that the AddonManager refuses to load in child processes. michael@0: michael@0: function run_test() { michael@0: // Already loaded the module by head_addons.js. Need to unload this again, so michael@0: // that overriding the app-info and re-importing the module works. michael@0: Components.utils.unload("resource://gre/modules/AddonManager.jsm"); michael@0: createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); michael@0: gAppInfo.processType = AM_Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT; michael@0: try { michael@0: Components.utils.import("resource://gre/modules/AddonManager.jsm"); michael@0: do_throw("AddonManager should have refused to load"); michael@0: } michael@0: catch (ex) { michael@0: do_print(ex.message); michael@0: do_check_true(!!ex.message); michael@0: } michael@0: }