summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpcshell/test_system_update_enterprisepolicy.js
diff options
context:
space:
mode:
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([
{