From a90a5cba08fdf6c0ceb95101c275108a152a3aed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:37 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../tests/xpcshell/test_permissions.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js') diff --git a/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js b/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js index f4440e53f5..c9231132c8 100644 --- a/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js +++ b/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js @@ -315,7 +315,7 @@ add_task(async function test_cookie_allow_session() { ); }); -// This again seems out of places, but AutoLaunchProtocolsFromOrigins +// This again seems out of place, but AutoLaunchProtocolsFromOrigins // is all permissions. add_task(async function test_autolaunchprotocolsfromorigins() { await setupPolicyEngineWithJson({ @@ -337,7 +337,7 @@ add_task(async function test_autolaunchprotocolsfromorigins() { ); }); -// This again seems out of places, but PasswordManagerExceptions +// This again seems out of place, but PasswordManagerExceptions // is all permissions. add_task(async function test_passwordmanagerexceptions() { await setupPolicyEngineWithJson({ @@ -353,3 +353,20 @@ add_task(async function test_passwordmanagerexceptions() { Ci.nsIPermissionManager.DENY_ACTION ); }); + +// This again seems out of place, but HttpAllowlist +// is all permissions. +add_task(async function test_httpsonly_exceptions() { + await setupPolicyEngineWithJson({ + policies: { + HttpAllowlist: ["https://http.example.com"], + }, + }); + equal( + PermissionTestUtils.testPermission( + URI("https://http.example.com"), + "https-only-load-insecure" + ), + Ci.nsIPermissionManager.ALLOW_ACTION + ); +}); -- cgit v1.2.3