summaryrefslogtreecommitdiffstats
path: root/security/sandbox/test/browser_content_sandbox_utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'security/sandbox/test/browser_content_sandbox_utils.js')
-rw-r--r--security/sandbox/test/browser_content_sandbox_utils.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/security/sandbox/test/browser_content_sandbox_utils.js b/security/sandbox/test/browser_content_sandbox_utils.js
index ce6ed39ff6..9b4c4af70a 100644
--- a/security/sandbox/test/browser_content_sandbox_utils.js
+++ b/security/sandbox/test/browser_content_sandbox_utils.js
@@ -33,7 +33,7 @@ function sanityChecks() {
}
info(`security.sandbox.content.level=${level}`);
- ok(level > 0, "content sandbox is enabled.");
+ Assert.greater(level, 0, "content sandbox is enabled.");
let isFileIOSandboxed = isContentFileIOSandboxed(level);
@@ -234,7 +234,7 @@ function isContentFileIOSandboxed(level) {
// Returns the lowest sandbox level where blanket reading of the profile
// directory from the content process should be blocked by the sandbox.
-function minProfileReadSandboxLevel(level) {
+function minProfileReadSandboxLevel() {
switch (Services.appinfo.OS) {
case "WINNT":
return 3;
@@ -250,7 +250,7 @@ function minProfileReadSandboxLevel(level) {
// Returns the lowest sandbox level where blanket reading of the home
// directory from the content process should be blocked by the sandbox.
-function minHomeReadSandboxLevel(level) {
+function minHomeReadSandboxLevel() {
switch (Services.appinfo.OS) {
case "WINNT":
return 3;
@@ -391,8 +391,9 @@ function GetBrowserType(type) {
}
browserType = GetBrowserType[type];
- ok(
- browserType.remoteType === type,
+ Assert.strictEqual(
+ browserType.remoteType,
+ type,
`GetBrowserType(${type}) returns a ${type} process`
);
return browserType;
@@ -445,8 +446,9 @@ async function runTestsList(tests) {
test.func
);
- ok(
- result.ok == test.ok,
+ Assert.equal(
+ result.ok,
+ test.ok,
`reading ${test.desc} from a ${processType} process ` +
`is ${okString} (${test.file.path})`
);
@@ -454,7 +456,11 @@ async function runTestsList(tests) {
// if the directory is not expected to be readable,
// ensure the listing has zero entries
if (test.func === readDir && !test.ok) {
- ok(result.numEntries == 0, `directory list is empty (${test.file.path})`);
+ Assert.equal(
+ result.numEntries,
+ 0,
+ `directory list is empty (${test.file.path})`
+ );
}
if (test.cleanup != undefined) {