diff --git a/devtools/client/debugger/test/mochitest/head.js b/devtools/client/debugger/test/mochitest/head.js index 43dd3ed9df238..ec3668e74d0be 100644 --- a/devtools/client/debugger/test/mochitest/head.js +++ b/devtools/client/debugger/test/mochitest/head.js @@ -13,6 +13,7 @@ Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtool // be affected by this pref. var gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log"); Services.prefs.setBoolPref("devtools.debugger.log", false); +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); var { BrowserToolboxProcess } = ChromeUtils.import("resource://devtools/client/framework/ToolboxProcess.jsm", {}); var { DebuggerServer } = require("devtools/server/main"); @@ -37,6 +38,7 @@ const CHROME_URI = Services.io.newURI(CHROME_URL); registerCleanupFunction(async function() { info("finish() was called, cleaning up..."); Services.prefs.setBoolPref("devtools.debugger.log", gEnableLogging); + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); while (gBrowser && gBrowser.tabs && gBrowser.tabs.length > 1) { info("Destroying toolbox."); diff --git a/devtools/client/shared/test/browser_dbg_listworkers.js b/devtools/client/shared/test/browser_dbg_listworkers.js index 7150acc952f83..679fcef2ceb5f 100644 --- a/devtools/client/shared/test/browser_dbg_listworkers.js +++ b/devtools/client/shared/test/browser_dbg_listworkers.js @@ -5,6 +5,12 @@ "use strict"; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + // Import helpers for the workers /* import-globals-from helper_workers.js */ Services.scriptloader.loadSubScript( diff --git a/devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js b/devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js index fc10ebe8baa21..8a56767f948af 100644 --- a/devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js +++ b/devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js @@ -4,6 +4,12 @@ "use strict"; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + // Test dynamic updates in the storage inspector for cookies. add_task(async function() { diff --git a/devtools/server/tests/unit/test_framebindings-01.js b/devtools/server/tests/unit/test_framebindings-01.js index 5e877aa8e75ce..aff653b258a7d 100644 --- a/devtools/server/tests/unit/test_framebindings-01.js +++ b/devtools/server/tests/unit/test_framebindings-01.js @@ -11,6 +11,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-stack"); diff --git a/devtools/server/tests/unit/test_framebindings-02.js b/devtools/server/tests/unit/test_framebindings-02.js index f8f0dcd33c2cd..8582cfb46901e 100644 --- a/devtools/server/tests/unit/test_framebindings-02.js +++ b/devtools/server/tests/unit/test_framebindings-02.js @@ -11,6 +11,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-stack"); diff --git a/devtools/server/tests/unit/test_framebindings-03.js b/devtools/server/tests/unit/test_framebindings-03.js index 044db6eab8a9e..c5df8cb70c5fe 100644 --- a/devtools/server/tests/unit/test_framebindings-03.js +++ b/devtools/server/tests/unit/test_framebindings-03.js @@ -12,6 +12,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-stack"); diff --git a/devtools/server/tests/unit/test_framebindings-04.js b/devtools/server/tests/unit/test_framebindings-04.js index 9a4b489385fca..8d748dba6554e 100644 --- a/devtools/server/tests/unit/test_framebindings-04.js +++ b/devtools/server/tests/unit/test_framebindings-04.js @@ -13,6 +13,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-stack"); diff --git a/devtools/server/tests/unit/test_framebindings-05.js b/devtools/server/tests/unit/test_framebindings-05.js index 268abc6244485..04c2526ecdb31 100644 --- a/devtools/server/tests/unit/test_framebindings-05.js +++ b/devtools/server/tests/unit/test_framebindings-05.js @@ -12,6 +12,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-stack"); diff --git a/devtools/server/tests/unit/test_framebindings-06.js b/devtools/server/tests/unit/test_framebindings-06.js index 9a383c0bd7146..fb8a6382880ca 100644 --- a/devtools/server/tests/unit/test_framebindings-06.js +++ b/devtools/server/tests/unit/test_framebindings-06.js @@ -7,6 +7,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-grips"); diff --git a/devtools/server/tests/unit/test_framebindings-07.js b/devtools/server/tests/unit/test_framebindings-07.js index 18fd870ab96f9..ff96e6dccfc57 100644 --- a/devtools/server/tests/unit/test_framebindings-07.js +++ b/devtools/server/tests/unit/test_framebindings-07.js @@ -8,6 +8,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + // Test that the EnvironmentClient's getBindings() method works as expected. function run_test() { initTestDebuggerServer(); diff --git a/devtools/server/tests/unit/test_longstringgrips-01.js b/devtools/server/tests/unit/test_longstringgrips-01.js index 3d5b295519b3d..0e10e5d1da3d5 100644 --- a/devtools/server/tests/unit/test_longstringgrips-01.js +++ b/devtools/server/tests/unit/test_longstringgrips-01.js @@ -7,6 +7,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-grips"); diff --git a/devtools/server/tests/unit/test_longstringgrips-02.js b/devtools/server/tests/unit/test_longstringgrips-02.js index 9bcaa8f5651a0..70ecf3a40330b 100644 --- a/devtools/server/tests/unit/test_longstringgrips-02.js +++ b/devtools/server/tests/unit/test_longstringgrips-02.js @@ -7,6 +7,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-grips"); diff --git a/devtools/server/tests/unit/test_objectgrips-04.js b/devtools/server/tests/unit/test_objectgrips-04.js index 976337c050a6f..5cefe33d532d4 100644 --- a/devtools/server/tests/unit/test_objectgrips-04.js +++ b/devtools/server/tests/unit/test_objectgrips-04.js @@ -9,6 +9,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-05.js b/devtools/server/tests/unit/test_objectgrips-05.js index f516a3ac21470..cbce64d847077 100644 --- a/devtools/server/tests/unit/test_objectgrips-05.js +++ b/devtools/server/tests/unit/test_objectgrips-05.js @@ -13,6 +13,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-06.js b/devtools/server/tests/unit/test_objectgrips-06.js index 8ed806de78ccc..76e8227ccd32c 100644 --- a/devtools/server/tests/unit/test_objectgrips-06.js +++ b/devtools/server/tests/unit/test_objectgrips-06.js @@ -13,6 +13,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-07.js b/devtools/server/tests/unit/test_objectgrips-07.js index f258f88d87eba..338606d56877f 100644 --- a/devtools/server/tests/unit/test_objectgrips-07.js +++ b/devtools/server/tests/unit/test_objectgrips-07.js @@ -13,6 +13,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-08.js b/devtools/server/tests/unit/test_objectgrips-08.js index 4b0cc159aaf93..6d2a097c08a88 100644 --- a/devtools/server/tests/unit/test_objectgrips-08.js +++ b/devtools/server/tests/unit/test_objectgrips-08.js @@ -8,6 +8,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-09.js b/devtools/server/tests/unit/test_objectgrips-09.js index aed5c056e75a1..c3e97b627cced 100644 --- a/devtools/server/tests/unit/test_objectgrips-09.js +++ b/devtools/server/tests/unit/test_objectgrips-09.js @@ -13,6 +13,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-10.js b/devtools/server/tests/unit/test_objectgrips-10.js index 7714d333f435a..c40aef6e0976f 100644 --- a/devtools/server/tests/unit/test_objectgrips-10.js +++ b/devtools/server/tests/unit/test_objectgrips-10.js @@ -8,6 +8,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + // Test that closures can be inspected. function run_test() { diff --git a/devtools/server/tests/unit/test_objectgrips-11.js b/devtools/server/tests/unit/test_objectgrips-11.js index 40e89cc70e64d..123986c5fdbf4 100644 --- a/devtools/server/tests/unit/test_objectgrips-11.js +++ b/devtools/server/tests/unit/test_objectgrips-11.js @@ -9,6 +9,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-grips"); diff --git a/devtools/server/tests/unit/test_objectgrips-12.js b/devtools/server/tests/unit/test_objectgrips-12.js index 32d6295bb25ed..fb948fc957d88 100644 --- a/devtools/server/tests/unit/test_objectgrips-12.js +++ b/devtools/server/tests/unit/test_objectgrips-12.js @@ -12,6 +12,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-grips"); diff --git a/devtools/server/tests/unit/test_objectgrips-16.js b/devtools/server/tests/unit/test_objectgrips-16.js index e05d3cc505e43..27c7c7fa9c345 100644 --- a/devtools/server/tests/unit/test_objectgrips-16.js +++ b/devtools/server/tests/unit/test_objectgrips-16.js @@ -9,6 +9,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-17.js b/devtools/server/tests/unit/test_objectgrips-17.js index fa3d8246d75dc..bbb4a05d1ac86 100644 --- a/devtools/server/tests/unit/test_objectgrips-17.js +++ b/devtools/server/tests/unit/test_objectgrips-17.js @@ -14,6 +14,12 @@ var gGlobalIsInvisible; var gSubsumes; var gIsOpaque; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-18.js b/devtools/server/tests/unit/test_objectgrips-18.js index ce99437d99859..631a0e574a9ce 100644 --- a/devtools/server/tests/unit/test_objectgrips-18.js +++ b/devtools/server/tests/unit/test_objectgrips-18.js @@ -9,6 +9,12 @@ var gClient; var gThreadClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-19.js b/devtools/server/tests/unit/test_objectgrips-19.js index 8e6989d7124aa..4c1d7eea1b309 100644 --- a/devtools/server/tests/unit/test_objectgrips-19.js +++ b/devtools/server/tests/unit/test_objectgrips-19.js @@ -7,6 +7,12 @@ var gDebuggee; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-20.js b/devtools/server/tests/unit/test_objectgrips-20.js index 4af7cabdf35f1..0916ca8406907 100644 --- a/devtools/server/tests/unit/test_objectgrips-20.js +++ b/devtools/server/tests/unit/test_objectgrips-20.js @@ -8,6 +8,12 @@ // when passing `ignoreNonIndexedProperties` and `ignoreIndexedProperties` options // with various objects. (See Bug 1403065) +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + async function run_test() { do_test_pending(); await run_test_with_server(DebuggerServer); diff --git a/devtools/server/tests/unit/test_objectgrips-21.js b/devtools/server/tests/unit/test_objectgrips-21.js index 52b2ffaef4713..73306bb6e9f4c 100644 --- a/devtools/server/tests/unit/test_objectgrips-21.js +++ b/devtools/server/tests/unit/test_objectgrips-21.js @@ -7,6 +7,12 @@ var gDebuggee; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/devtools/server/tests/unit/test_objectgrips-22.js b/devtools/server/tests/unit/test_objectgrips-22.js index 025efc2868294..d09425abeae24 100644 --- a/devtools/server/tests/unit/test_objectgrips-22.js +++ b/devtools/server/tests/unit/test_objectgrips-22.js @@ -7,6 +7,12 @@ var gDebuggee; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + add_task(async function run_test() { await run_test_with_server(DebuggerServer); await run_test_with_server(WorkerDebuggerServer); diff --git a/devtools/server/tests/unit/test_objectgrips-array-like-object.js b/devtools/server/tests/unit/test_objectgrips-array-like-object.js index ad531fc136456..ed458a8a9e994 100644 --- a/devtools/server/tests/unit/test_objectgrips-array-like-object.js +++ b/devtools/server/tests/unit/test_objectgrips-array-like-object.js @@ -7,6 +7,12 @@ // numeric keys, and if they have a length property, that it matches the number // of numeric keys. (See Bug 1371936) +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + async function run_test() { do_test_pending(); await run_test_with_server(DebuggerServer); diff --git a/devtools/server/tests/unit/test_objectgrips-fn-apply-01.js b/devtools/server/tests/unit/test_objectgrips-fn-apply-01.js index 2f4b493f06493..4c76ccdfc1bf2 100644 --- a/devtools/server/tests/unit/test_objectgrips-fn-apply-01.js +++ b/devtools/server/tests/unit/test_objectgrips-fn-apply-01.js @@ -4,6 +4,12 @@ "use strict"; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + async function run_test() { try { do_test_pending(); diff --git a/devtools/server/tests/unit/test_objectgrips-fn-apply-02.js b/devtools/server/tests/unit/test_objectgrips-fn-apply-02.js index fbeb882333701..120f9df0307b5 100644 --- a/devtools/server/tests/unit/test_objectgrips-fn-apply-02.js +++ b/devtools/server/tests/unit/test_objectgrips-fn-apply-02.js @@ -4,6 +4,12 @@ "use strict"; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + async function run_test() { try { do_test_pending(); diff --git a/devtools/server/tests/unit/test_objectgrips-fn-apply-03.js b/devtools/server/tests/unit/test_objectgrips-fn-apply-03.js index 58cd354da1575..cb5e59ff2aad5 100644 --- a/devtools/server/tests/unit/test_objectgrips-fn-apply-03.js +++ b/devtools/server/tests/unit/test_objectgrips-fn-apply-03.js @@ -4,6 +4,12 @@ "use strict"; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + async function run_test() { try { do_test_pending(); diff --git a/devtools/server/tests/unit/test_objectgrips-property-value-01.js b/devtools/server/tests/unit/test_objectgrips-property-value-01.js index 154037aebcaee..76e633c1e6cb4 100644 --- a/devtools/server/tests/unit/test_objectgrips-property-value-01.js +++ b/devtools/server/tests/unit/test_objectgrips-property-value-01.js @@ -4,6 +4,12 @@ "use strict"; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + async function run_test() { try { do_test_pending(); diff --git a/devtools/server/tests/unit/test_objectgrips-property-value-02.js b/devtools/server/tests/unit/test_objectgrips-property-value-02.js index 67ec6358ca793..baa58b1677c93 100644 --- a/devtools/server/tests/unit/test_objectgrips-property-value-02.js +++ b/devtools/server/tests/unit/test_objectgrips-property-value-02.js @@ -4,6 +4,12 @@ "use strict"; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + async function run_test() { try { do_test_pending(); diff --git a/devtools/server/tests/unit/test_pause_exceptions-01.js b/devtools/server/tests/unit/test_pause_exceptions-01.js index e2c0a15739231..97b4005c83ee5 100644 --- a/devtools/server/tests/unit/test_pause_exceptions-01.js +++ b/devtools/server/tests/unit/test_pause_exceptions-01.js @@ -13,6 +13,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-stack"); diff --git a/devtools/server/tests/unit/test_pause_exceptions-02.js b/devtools/server/tests/unit/test_pause_exceptions-02.js index 7778034908244..1dc724072ace5 100644 --- a/devtools/server/tests/unit/test_pause_exceptions-02.js +++ b/devtools/server/tests/unit/test_pause_exceptions-02.js @@ -12,6 +12,12 @@ var gDebuggee; var gClient; var gThreadClient; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { initTestDebuggerServer(); gDebuggee = addTestGlobal("test-stack"); diff --git a/devtools/server/tests/unit/test_stepping-05.js b/devtools/server/tests/unit/test_stepping-05.js index 8d63d1dad4956..5485ddffb2894 100644 --- a/devtools/server/tests/unit/test_stepping-05.js +++ b/devtools/server/tests/unit/test_stepping-05.js @@ -14,6 +14,12 @@ var gDebuggee; var gClient; var gCallback; +Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + +registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function run_test() { run_test_with_server(DebuggerServer, function() { run_test_with_server(WorkerDebuggerServer, do_test_finished); diff --git a/dom/plugins/test/mochitest/test_hangui.xul b/dom/plugins/test/mochitest/test_hangui.xul index 317d18d973caf..12f19ad9d3107 100644 --- a/dom/plugins/test/mochitest/test_hangui.xul +++ b/dom/plugins/test/mochitest/test_hangui.xul @@ -22,6 +22,8 @@ { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); +}); + function makeText(withBOM, charset) { var theText = eval("sample" + charset); diff --git a/js/ductwork/debugger/tests/test_nativewrappers.js b/js/ductwork/debugger/tests/test_nativewrappers.js index 7cf49a6f1a061..1b71df0e2f656 100644 --- a/js/ductwork/debugger/tests/test_nativewrappers.js +++ b/js/ductwork/debugger/tests/test_nativewrappers.js @@ -1,6 +1,13 @@ function run_test() { ChromeUtils.import("resource://gre/modules/jsdebugger.jsm"); + ChromeUtils.import("resource://gre/modules/Services.jsm"); + + Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true); + registerCleanupFunction(() => { + Services.prefs.clearUserPref("security.allow_eval_with_system_principal"); + }); + addDebuggerToGlobal(this); var g = testGlobal("test1"); diff --git a/js/xpconnect/tests/chrome/test_bug732665.xul b/js/xpconnect/tests/chrome/test_bug732665.xul index 63af7af6361e1..a3ec323dcb400 100644 --- a/js/xpconnect/tests/chrome/test_bug732665.xul +++ b/js/xpconnect/tests/chrome/test_bug732665.xul @@ -18,6 +18,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=732665