summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/test
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/inspector/test')
-rw-r--r--devtools/client/inspector/test/browser_inspector_highlighter-autohide-config_03.js2
-rw-r--r--devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js6
-rw-r--r--devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-label.js4
-rw-r--r--devtools/client/inspector/test/browser_inspector_highlighter-geometry_01.js1
-rw-r--r--devtools/client/inspector/test/browser_inspector_highlighter-measure_03.js6
-rw-r--r--devtools/client/inspector/test/browser_inspector_highlighter-measure_04.js6
-rw-r--r--devtools/client/inspector/test/browser_inspector_sidebarstate.js4
-rw-r--r--devtools/client/inspector/test/browser_inspector_switch-to-inspector-on-pick.js2
8 files changed, 15 insertions, 16 deletions
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-autohide-config_03.js b/devtools/client/inspector/test/browser_inspector_highlighter-autohide-config_03.js
index 188b99a7cb..e90bd87ad0 100644
--- a/devtools/client/inspector/test/browser_inspector_highlighter-autohide-config_03.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-autohide-config_03.js
@@ -60,7 +60,7 @@ add_task(async function () {
somehow not overwritten and fires another "highlighter-hidden" event.
*/
let wasEmitted = false;
- const waitForExtraEvent = new Promise((resolve, reject) => {
+ const waitForExtraEvent = new Promise(resolve => {
const _handler = () => {
wasEmitted = true;
resolve();
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js b/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js
index 0c05aa219f..5fa5567e3f 100644
--- a/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js
@@ -60,10 +60,10 @@ const MOVE_EVENTS_DATA = [
// Mouse initialization for right snapping
{
type: "mouse",
- x: (width, height) => width - 5,
+ x: width => width - 5,
y: 0,
expected: {
- x: (width, height) => width - 5,
+ x: width => width - 5,
y: 0,
},
},
@@ -73,7 +73,7 @@ const MOVE_EVENTS_DATA = [
key: "VK_RIGHT",
shift: true,
expected: {
- x: (width, height) => width,
+ x: width => width,
y: 0,
},
desc: "Right snapping to x=max window width available",
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-label.js b/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-label.js
index d9413e5d39..37d3070c04 100644
--- a/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-label.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-label.js
@@ -65,14 +65,14 @@ const TEST_DATA = [
},
{
desc: "Move the mouse to the top left",
- getCoordinates: (width, height) => {
+ getCoordinates: () => {
return { x: 0, y: 0 };
},
expectedPositions: { top: false, right: true, left: false },
},
{
desc: "Move the mouse to the top right",
- getCoordinates: (width, height) => {
+ getCoordinates: width => {
return { x: width, y: 0 };
},
expectedPositions: { top: false, right: false, left: true },
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-geometry_01.js b/devtools/client/inspector/test/browser_inspector_highlighter-geometry_01.js
index c50dee30b0..bfdfd12cd8 100644
--- a/devtools/client/inspector/test/browser_inspector_highlighter-geometry_01.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-geometry_01.js
@@ -58,7 +58,6 @@ async function hasArrowsAndLabelsAndHandlers({ getElementAttribute }) {
async function isHiddenForNonPositionedNonSizedElement({
show,
- hide,
isElementHidden,
}) {
info("Asking to show the highlighter on an inline, non p ositioned element");
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-measure_03.js b/devtools/client/inspector/test/browser_inspector_highlighter-measure_03.js
index 906284ba86..dbe70d83ae 100644
--- a/devtools/client/inspector/test/browser_inspector_highlighter-measure_03.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-measure_03.js
@@ -16,10 +16,10 @@ const WIDTH = 160;
const HEIGHT = 100;
const HANDLER_MAP = {
- top(areaWidth, areaHeight) {
+ top(areaWidth) {
return { x: Math.round(areaWidth / 2), y: 0 };
},
- topright(areaWidth, areaHeight) {
+ topright(areaWidth) {
return { x: areaWidth, y: 0 };
},
right(areaWidth, areaHeight) {
@@ -37,7 +37,7 @@ const HANDLER_MAP = {
left(areaWidth, areaHeight) {
return { x: 0, y: Math.round(areaHeight / 2) };
},
- topleft(areaWidth, areaHeight) {
+ topleft() {
return { x: 0, y: 0 };
},
};
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-measure_04.js b/devtools/client/inspector/test/browser_inspector_highlighter-measure_04.js
index d9dcd5d89f..8493981dd3 100644
--- a/devtools/client/inspector/test/browser_inspector_highlighter-measure_04.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-measure_04.js
@@ -18,10 +18,10 @@ const X_OFFSET = 15;
const Y_OFFSET = 10;
const HANDLER_MAP = {
- top(areaWidth, areaHeight) {
+ top(areaWidth) {
return { x: Math.round(areaWidth / 2), y: 0 };
},
- topright(areaWidth, areaHeight) {
+ topright(areaWidth) {
return { x: areaWidth, y: 0 };
},
right(areaWidth, areaHeight) {
@@ -39,7 +39,7 @@ const HANDLER_MAP = {
left(areaWidth, areaHeight) {
return { x: 0, y: Math.round(areaHeight / 2) };
},
- topleft(areaWidth, areaHeight) {
+ topleft() {
return { x: 0, y: 0 };
},
};
diff --git a/devtools/client/inspector/test/browser_inspector_sidebarstate.js b/devtools/client/inspector/test/browser_inspector_sidebarstate.js
index 396e78c91f..6ccc6df6f4 100644
--- a/devtools/client/inspector/test/browser_inspector_sidebarstate.js
+++ b/devtools/client/inspector/test/browser_inspector_sidebarstate.js
@@ -122,8 +122,8 @@ function checkTelemetryResults() {
const expected = TELEMETRY_DATA[i];
// ignore timestamp
- ok(timestamp > 0, "timestamp is greater than 0");
- ok(extra.time_open > 0, "time_open is greater than 0");
+ Assert.greater(timestamp, 0, "timestamp is greater than 0");
+ Assert.greater(Number(extra.time_open), 0, "time_open is greater than 0");
is(category, expected.category, "category is correct");
is(method, expected.method, "method is correct");
is(object, expected.object, "object is correct");
diff --git a/devtools/client/inspector/test/browser_inspector_switch-to-inspector-on-pick.js b/devtools/client/inspector/test/browser_inspector_switch-to-inspector-on-pick.js
index 171f4f8e7f..2bcd2e9873 100644
--- a/devtools/client/inspector/test/browser_inspector_switch-to-inspector-on-pick.js
+++ b/devtools/client/inspector/test/browser_inspector_switch-to-inspector-on-pick.js
@@ -104,7 +104,7 @@ function checkResults() {
is(method, expected.method, "method is correct");
is(object, expected.object, "object is correct");
is(value, null, "value is correct");
- ok(extra.width > 0, "width is greater than 0");
+ Assert.greater(Number(extra.width), 0, "width is greater than 0");
checkExtra("host", extra, expected);
checkExtra("start_state", extra, expected);