From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../sandbox/test/browser_content_sandbox_utils.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'security/sandbox/test/browser_content_sandbox_utils.js') 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) { -- cgit v1.2.3