summaryrefslogtreecommitdiffstats
path: root/dom/promise/tests/unit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /dom/promise/tests/unit
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 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.js8
-rw-r--r--dom/promise/tests/unit/test_promise_job_across_sandbox.js5
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;
},
};