summaryrefslogtreecommitdiffstats
path: root/browser/components/enterprisepolicies/tests/xpcshell/test_empty_policy.js
blob: 5047eeb4e0aa242870b78c67875eba05e8a0500d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

add_task(async function test_empty_policy() {
  await setupPolicyEngineWithJson({
    policies: {
      Certificates: {},
    },
  });

  equal(
    Services.policies.status,
    Ci.nsIEnterprisePolicies.INACTIVE,
    "Engine is not active"
  );
});

add_task(async function test_empty_array() {
  await setupPolicyEngineWithJson({
    policies: {
      RequestedLocales: [],
    },
  });

  equal(
    Services.policies.status,
    Ci.nsIEnterprisePolicies.ACTIVE,
    "Engine is active"
  );
});