From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- image/test/browser/browser_bug666317.js | 4 ++-- ...browser_offscreen_image_in_out_of_process_iframe.js | 18 +++++++++--------- image/test/browser/head.js | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'image/test/browser') diff --git a/image/test/browser/browser_bug666317.js b/image/test/browser/browser_bug666317.js index 7f58c61c56..5d039575c8 100644 --- a/image/test/browser/browser_bug666317.js +++ b/image/test/browser/browser_bug666317.js @@ -15,11 +15,11 @@ var gScriptedObserver; var gClonedRequest; function ImageObserver(decodeCallback, discardCallback) { - this.decodeComplete = function onDecodeComplete(aRequest) { + this.decodeComplete = function onDecodeComplete() { decodeCallback(); }; - this.discard = function onDiscard(request) { + this.discard = function onDiscard() { if (!gWaitingForDiscard) { return; } diff --git a/image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js b/image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js index b431902eb7..346413b602 100644 --- a/image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js +++ b/image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js @@ -75,14 +75,14 @@ add_task(async function () { // Returns the count of frameUpdate during |time| (in ms) period. async function observeFrameUpdate(time) { function ImageDecoderObserverStub() { - this.sizeAvailable = function sizeAvailable(aRequest) {}; - this.frameComplete = function frameComplete(aRequest) {}; - this.decodeComplete = function decodeComplete(aRequest) {}; - this.loadComplete = function loadComplete(aRequest) {}; - this.frameUpdate = function frameUpdate(aRequest) {}; - this.discard = function discard(aRequest) {}; - this.isAnimated = function isAnimated(aRequest) {}; - this.hasTransparency = function hasTransparency(aRequest) {}; + this.sizeAvailable = function sizeAvailable() {}; + this.frameComplete = function frameComplete() {}; + this.decodeComplete = function decodeComplete() {}; + this.loadComplete = function loadComplete() {}; + this.frameUpdate = function frameUpdate() {}; + this.discard = function discard() {}; + this.isAnimated = function isAnimated() {}; + this.hasTransparency = function hasTransparency() {}; } // Start from the callback of setTimeout. @@ -140,7 +140,7 @@ add_task(async function () { await new Promise(resolve => requestAnimationFrame(resolve)); frameCount = await SpecialPowers.spawn(iframe, [1000], observeFrameUpdate); - ok(frameCount > 0, "There should be frameUpdate(s)"); + Assert.greater(frameCount, 0, "There should be frameUpdate(s)"); await new Promise(resolve => requestAnimationFrame(resolve)); diff --git a/image/test/browser/head.js b/image/test/browser/head.js index 29fc67a1a7..00f35babb2 100644 --- a/image/test/browser/head.js +++ b/image/test/browser/head.js @@ -27,7 +27,7 @@ function actOnMozImage(doc, id, func) { function assertPrefVal(name, val) { let boolValue = Services.prefs.getBoolPref(name); - ok(boolValue === val, `pref ${name} is set to ${val}`); + Assert.strictEqual(boolValue, val, `pref ${name} is set to ${val}`); if (boolValue !== val) { throw Error(`pref ${name} is not set to ${val}`); } @@ -121,7 +121,7 @@ async function createMozIconInFile(ext, expectSuccess = true) { await waitLoad; const icon = content.document.getElementById(`moz-icon-${_ext}-${_kSize}`); - ok(icon !== null, `got a valid ${_ext} moz-icon`); + Assert.notStrictEqual(icon, null, `got a valid ${_ext} moz-icon`); is(icon.width, _kSize, `${_kSize} px width ${_ext} moz-icon`); is(icon.height, _kSize, `${_kSize} px height ${_ext} moz-icon`); }; -- cgit v1.2.3