summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/tests/browser
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/modules/tests/browser')
-rw-r--r--toolkit/modules/tests/browser/browser_Finder.js4
-rw-r--r--toolkit/modules/tests/browser/browser_FinderHighlighter.js2
-rw-r--r--toolkit/modules/tests/browser/browser_Troubleshoot.js27
-rw-r--r--toolkit/modules/tests/browser/browser_web_channel.js42
-rw-r--r--toolkit/modules/tests/browser/head.js2
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: [],