Bug 1772378: Add test exemptions for expanded eval restrictions r=jdescottes

Depends on D148141

Differential Revision: https://phabricator.services.mozilla.com/D150553
This commit is contained in:
Tom Ritter 2022-06-29 13:45:57 +00:00
Родитель be3d5275d4
Коммит 9257dc2ebf
3 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -4,9 +4,12 @@ head = head_dbg.js
firefox-appdir = browser
skip-if = toolkit == 'android'
# While not every devtools test uses evalInSandbox over 80 do, so it's easier to
# set the pref for all the tests here.
# set allow_parent_unrestricted_js_loads for all the tests here.
# Similar story for the eval restrictions
prefs =
security.allow_parent_unrestricted_js_loads=true
security.allow_eval_with_system_principal=true
security.allow_eval_in_parent_process=true
support-files =
completions.js

Просмотреть файл

@ -14,8 +14,12 @@ function run_test() {
"security.allow_parent_unrestricted_js_loads",
true
);
Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
Services.prefs.setBoolPref("security.allow_eval_in_parent_process", true);
registerCleanupFunction(() => {
Services.prefs.clearUserPref("security.allow_parent_unrestricted_js_loads");
Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
Services.prefs.clearUserPref("security.allow_eval_in_parent_process");
});
// Create a Debugger observing a debuggee's allocations.

Просмотреть файл

@ -17,8 +17,12 @@ function run_test() {
"security.allow_parent_unrestricted_js_loads",
true
);
Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
Services.prefs.setBoolPref("security.allow_eval_in_parent_process", true);
registerCleanupFunction(() => {
Services.prefs.clearUserPref("security.allow_parent_unrestricted_js_loads");
Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
Services.prefs.clearUserPref("security.allow_eval_in_parent_process");
});
// Create a Debugger observing a debuggee's allocations.