summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js')
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js26
1 files changed, 23 insertions, 3 deletions
diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js b/toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js
index d36b97a3cc..e25890515f 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js
@@ -44,12 +44,32 @@ const TEST_CONDITIONS = {
add_task(async function test_update_disabled_by_policy() {
await setupSystemAddonConditions(TEST_CONDITIONS, distroDir);
+ const TEST_POLICY_DATA = {
+ DisableSystemAddonUpdate: true,
+ };
await EnterprisePolicyTesting.setupPolicyEngineWithJson({
- policies: {
- DisableSystemAddonUpdate: true,
- },
+ policies: TEST_POLICY_DATA,
});
+ Assert.deepEqual(
+ Services.policies.getActivePolicies(),
+ TEST_POLICY_DATA,
+ "Got the expected test policy data as the active policy " +
+ "(if this assertions fails, check your system for enterprise policies installed at system level)"
+ );
+
+ Assert.equal(
+ Services.policies.isAllowed("SysAddonUpdate"),
+ false,
+ "Expected SysAddonUpdate feature to be disabled by policies"
+ );
+
+ Assert.equal(
+ Services.prefs.getBoolPref("extensions.systemAddon.update.enabled"),
+ true,
+ "Expected system addon updates to not be already disabled through prefs"
+ );
+
await updateAllSystemAddons(
buildSystemAddonUpdates([
{