forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1600007 - Check entire policy for empty objects. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D55713 --HG-- extra : moz-landing-system : lando
- Loading branch information
Showing
4 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
browser/components/enterprisepolicies/tests/xpcshell/test_empty_policy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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" | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters