diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /toolkit/modules/tests/browser | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/modules/tests/browser')
5 files changed, 49 insertions, 28 deletions
diff --git a/toolkit/modules/tests/browser/browser_Finder.js b/toolkit/modules/tests/browser/browser_Finder.js index 7bcf7e8a00..03724d2548 100644 --- a/toolkit/modules/tests/browser/browser_Finder.js +++ b/toolkit/modules/tests/browser/browser_Finder.js @@ -44,7 +44,7 @@ add_task(async function () { findResult = await promiseFind; is(findResult.result, Ci.nsITypeAheadFind.FIND_FOUND, "should find link"); - await SpecialPowers.spawn(tab.linkedBrowser, [], async function (arg) { + await SpecialPowers.spawn(tab.linkedBrowser, [], async function () { Assert.ok( !!content.document.getElementsByTagName("a")[0].style.outline, "outline set" @@ -61,7 +61,7 @@ add_task(async function () { "should find link again" ); - await SpecialPowers.spawn(tab.linkedBrowser, [], async function (arg) { + await SpecialPowers.spawn(tab.linkedBrowser, [], async function () { Assert.ok( !content.document.getElementsByTagName("a")[0].style.outline, "outline not set" diff --git a/toolkit/modules/tests/browser/browser_FinderHighlighter.js b/toolkit/modules/tests/browser/browser_FinderHighlighter.js index 7e377e47d1..be4f0fefef 100644 --- a/toolkit/modules/tests/browser/browser_FinderHighlighter.js +++ b/toolkit/modules/tests/browser/browser_FinderHighlighter.js @@ -33,7 +33,7 @@ add_task(async function testModalResults() { insertCalls: [5, 6], removeCalls: [4, 5], // eslint-disable-next-line object-shorthand - extraTest: function (maskNode, outlineNode, rects) { + extraTest: function (maskNode, outlineNode) { Assert.equal( outlineNode.getElementsByTagName("div").length, 2, diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index d627f175e4..dbfbe69909 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -1288,6 +1288,27 @@ const SNAPSHOT_SCHEMA = { }, }, }, + contentAnalysis: { + type: "object", + properties: { + active: { + required: true, + type: "boolean", + }, + connected: { + type: "boolean", + }, + agentPath: { + type: "string", + }, + failedSignatureVerification: { + type: "boolean", + }, + requestCount: { + type: "number", + }, + }, + }, }, }; @@ -1346,9 +1367,9 @@ function validateObject_array(array, schema) { array.forEach(elt => validateObject(elt, schema.items)); } -function validateObject_string(str, schema) {} -function validateObject_boolean(bool, schema) {} -function validateObject_number(num, schema) {} +function validateObject_string() {} +function validateObject_boolean() {} +function validateObject_number() {} function validationErr(msg, obj, schema) { return new Error( diff --git a/toolkit/modules/tests/browser/browser_web_channel.js b/toolkit/modules/tests/browser/browser_web_channel.js index 9dfa59485b..289e4d1d14 100644 --- a/toolkit/modules/tests/browser/browser_web_channel.js +++ b/toolkit/modules/tests/browser/browser_web_channel.js @@ -23,10 +23,10 @@ var gTests = [ { desc: "WebChannel generic message", run() { - return new Promise(function (resolve, reject) { + return new Promise(function (resolve) { let tab; let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH)); - channel.listen(function (id, message, target) { + channel.listen(function (id, message) { is(id, "generic"); is(message.something.nested, "hello"); channel.stopListening(); @@ -44,9 +44,9 @@ var gTests = [ { desc: "WebChannel generic message in a private window.", async run() { - let promiseTestDone = new Promise(function (resolve, reject) { + let promiseTestDone = new Promise(function (resolve) { let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH)); - channel.listen(function (id, message, target) { + channel.listen(function (id, message) { is(id, "generic"); is(message.something.nested, "hello"); channel.stopListening(); @@ -66,7 +66,7 @@ var gTests = [ { desc: "WebChannel two way communication", run() { - return new Promise(function (resolve, reject) { + return new Promise(function (resolve) { let tab; let channel = new WebChannel("twoway", Services.io.newURI(HTTP_PATH)); @@ -102,7 +102,7 @@ var gTests = [ Services.io.newURI(HTTP_IFRAME_PATH) ); let promiseTestDone = new Promise(function (resolve, reject) { - parentChannel.listen(function (id, message, sender) { + parentChannel.listen(function () { reject(new Error("WebChannel message incorrectly sent to parent")); }); @@ -218,14 +218,14 @@ var gTests = [ { desc: "WebChannel multichannel", run() { - return new Promise(function (resolve, reject) { + return new Promise(function (resolve) { let tab; let channel = new WebChannel( "multichannel", Services.io.newURI(HTTP_PATH) ); - channel.listen(function (id, message, sender) { + channel.listen(function (id) { is(id, "multichannel"); gBrowser.removeTab(tab); resolve(); @@ -246,8 +246,8 @@ var gTests = [ // an unsolicted message is sent from Chrome->Content which is then // echoed back. If the echo is received here, then the content // received the message. - let messagePromise = new Promise(function (resolve, reject) { - channel.listen(function (id, message, sender) { + let messagePromise = new Promise(function (resolve) { + channel.listen(function (id, message) { is(id, "echo"); is(message.command, "unsolicited"); @@ -283,8 +283,8 @@ var gTests = [ // an unsolicted message is sent from Chrome->Content which is then // echoed back. If the echo is received here, then the content // received the message. - let messagePromise = new Promise(function (resolve, reject) { - channel.listen(function (id, message, sender) { + let messagePromise = new Promise(function (resolve) { + channel.listen(function (id, message) { is(id, "echo"); is(message.command, "unsolicited"); @@ -326,7 +326,7 @@ var gTests = [ // and should not be echoed back. The second, `done`, is sent to the // correct principal and should be echoed back. let messagePromise = new Promise(function (resolve, reject) { - channel.listen(function (id, message, sender) { + channel.listen(function (id, message) { is(id, "echo"); if (message.command === "done") { @@ -435,8 +435,8 @@ var gTests = [ * message. */ let channel = new WebChannel("objects", Services.io.newURI(HTTP_PATH)); - let testDonePromise = new Promise((resolve, reject) => { - channel.listen((id, message, sender) => { + let testDonePromise = new Promise(resolve => { + channel.listen((id, message) => { is(id, "objects"); is(message.type, "string"); resolve(); @@ -466,7 +466,7 @@ var gTests = [ let testDonePromise = new Promise((resolve, reject) => { let sawObject = false; let sawString = false; - channel.listen((id, message, sender) => { + channel.listen((id, message) => { is(id, "objects"); if (message.type === "object") { ok(!sawObject); @@ -509,9 +509,9 @@ var gTests = [ // The channel where we see the response when the content sees the error let echoChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH)); - let testDonePromise = new Promise((resolve, reject) => { + let testDonePromise = new Promise(resolve => { // listen for the confirmation that content saw the error. - echoChannel.listen((id, message, sender) => { + echoChannel.listen((id, message) => { is(id, "echo"); is(message.error, "oh no"); is(message.errno, ERRNO_UNKNOWN_ERROR); @@ -519,7 +519,7 @@ var gTests = [ }); // listen for a message telling us to simulate an error. - channel.listen((id, message, sender) => { + channel.listen((id, message) => { is(id, "error"); is(message.command, "oops"); throw new Error("oh no"); @@ -545,9 +545,9 @@ var gTests = [ // The channel where we see the response when the content sees the error let echoChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH)); - let testDonePromise = new Promise((resolve, reject) => { + let testDonePromise = new Promise(resolve => { // listen for the confirmation that content saw the error. - echoChannel.listen((id, message, sender) => { + echoChannel.listen((id, message) => { is(id, "echo"); is(message.error, "No Such Channel"); is(message.errno, ERRNO_NO_SUCH_CHANNEL); diff --git a/toolkit/modules/tests/browser/head.js b/toolkit/modules/tests/browser/head.js index 7c3f75b106..84bfad9328 100644 --- a/toolkit/modules/tests/browser/head.js +++ b/toolkit/modules/tests/browser/head.js @@ -87,7 +87,7 @@ function promiseTestHighlighterOutput( browser, [{ word, expectedResult, extraTest: extraTest.toSource() }], async function ({ word, expectedResult, extraTest }) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { let stubbed = {}; let callCounts = { insertCalls: [], |