diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /dom/promise/tests/unit | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/promise/tests/unit')
-rw-r--r-- | dom/promise/tests/unit/test_monitor_uncaught.js | 8 | ||||
-rw-r--r-- | dom/promise/tests/unit/test_promise_job_across_sandbox.js | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/dom/promise/tests/unit/test_monitor_uncaught.js b/dom/promise/tests/unit/test_monitor_uncaught.js index afa328cb97..043e6dac8f 100644 --- a/dom/promise/tests/unit/test_monitor_uncaught.js +++ b/dom/promise/tests/unit/test_monitor_uncaught.js @@ -23,8 +23,8 @@ add_task(async function test_globals() { }); add_task(async function test_promiseID() { - let p1 = new Promise(resolve => {}); - let p2 = new Promise(resolve => {}); + let p1 = new Promise(() => {}); + let p2 = new Promise(() => {}); let p3 = p2.catch(null); let promise = [p1, p2, p3]; @@ -111,7 +111,7 @@ add_task(async function test_observe_uncaught() { let onConsumed = new CallbackResults("onConsumed"); let observer = { - onLeftUncaught(promise, data) { + onLeftUncaught(promise) { onLeftUncaught.observe(promise); }, onConsumed(promise) { @@ -121,7 +121,7 @@ add_task(async function test_observe_uncaught() { let resolveLater = function (delay = 20) { // eslint-disable-next-line mozilla/no-arbitrary-setTimeout - return new Promise((resolve, reject) => setTimeout(resolve, delay)); + return new Promise(resolve => setTimeout(resolve, delay)); }; let rejectLater = function (delay = 20) { // eslint-disable-next-line mozilla/no-arbitrary-setTimeout diff --git a/dom/promise/tests/unit/test_promise_job_across_sandbox.js b/dom/promise/tests/unit/test_promise_job_across_sandbox.js index ff1d1575e3..d98947cccc 100644 --- a/dom/promise/tests/unit/test_promise_job_across_sandbox.js +++ b/dom/promise/tests/unit/test_promise_job_across_sandbox.js @@ -114,7 +114,7 @@ add_task(async function testThenableJob() { const p = new Promise(resolve => { // Create a bound function where its realm is privileged realm, and // its target is from sandbox realm. - sandbox.then = function (onFulfilled, onRejected) { + sandbox.then = function () { resolve(10); }; }); @@ -138,7 +138,7 @@ add_task(async function testThenableJobNuked() { const sandbox = createSandbox(); let called = false; - sandbox.then = function (onFulfilled, onRejected) { + sandbox.then = function () { called = true; }; @@ -175,6 +175,7 @@ add_task(async function testThenableJobAccessError() { sandbox.thenable = { get then() { accessed = true; + return undefined; }, }; |