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 --- dom/promise/tests/test_promise_xrays.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'dom/promise/tests/test_promise_xrays.html') diff --git a/dom/promise/tests/test_promise_xrays.html b/dom/promise/tests/test_promise_xrays.html index 8559dbb2a4..782251d332 100644 --- a/dom/promise/tests/test_promise_xrays.html +++ b/dom/promise/tests/test_promise_xrays.html @@ -44,24 +44,24 @@ function testHaveXray() { } function testConstructor1() { - var p = new win.Promise(function(resolve, reject) { resolve(win.Promise.resolve(5)); }); + var p = new win.Promise(function(resolve) { resolve(win.Promise.resolve(5)); }); p.then( function(arg) { is(arg, 5, "Content Promise constructor resolved with content promise should work"); }, - function(e) { + function() { ok(false, "Content Promise constructor resolved with content promise should not fail"); } ).then(nextTest); } function testConstructor2() { - var p = new win.Promise(function(resolve, reject) { resolve(Promise.resolve(5)); }); + var p = new win.Promise(function(resolve) { resolve(Promise.resolve(5)); }); p.then( function(arg) { is(arg, 5, "Content Promise constructor resolved with chrome promise should work"); }, - function(e) { + function() { ok(false, "Content Promise constructor resolved with chrome promise should not fail"); } ).then(nextTest); @@ -223,20 +223,20 @@ function testResolve3() { function(arg) { is(arg, 5, "Promise.resolve with chrome Promise should work"); }, - function(e) { + function() { ok(false, "Promise.resolve with chrome Promise should not fail"); } ).then(nextTest); } function testResolve4() { - var p = new win.Promise((res, rej) => {}); + var p = new win.Promise(() => {}); Cu.getJSTestingFunctions().resolvePromise(p, 42); p.then( function(arg) { is(arg, 42, "Resolving an Xray to a promise with TestingFunctions resolvePromise should work"); }, - function(e) { + function() { ok(false, "Resolving an Xray to a promise with TestingFunctions resolvePromise should not fail"); } ).then(nextTest); @@ -246,7 +246,7 @@ function testReject1() { var p = win.Promise.reject(5); ok(p instanceof win.Promise, "Promise.reject should return a promise"); p.then( - function(arg) { + function() { ok(false, "Promise should be rejected"); }, function(e) { @@ -256,10 +256,10 @@ function testReject1() { } function testReject2() { - var p = new win.Promise((res, rej) => {}); + var p = new win.Promise(() => {}); Cu.getJSTestingFunctions().rejectPromise(p, 42); p.then( - function(arg) { + function() { ok(false, "Rejecting an Xray to a promise with TestingFunctions rejectPromise should trigger catch handler"); }, function(e) { @@ -277,7 +277,7 @@ function testThen1() { function(arg) { is(arg, 25, "Promise.then should work"); }, - function(e) { + function() { ok(false, "Promise.then should not fail"); } ).then(nextTest); @@ -292,7 +292,7 @@ function testThen2() { function(arg) { is(arg, 25, "Promise.then resolved with chrome promise should work"); }, - function(e) { + function() { ok(false, "Promise.then resolved with chrome promise should not fail"); } ).then(nextTest); @@ -308,7 +308,7 @@ function testCatch1() { function(arg) { is(arg, 25, "Promise.catch should work"); }, - function(e) { + function() { ok(false, "Promise.catch should not fail"); } ).then(nextTest); -- cgit v1.2.3