diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /widget/tests/browser | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/tests/browser')
-rw-r--r-- | widget/tests/browser/browser_test_clipboard_contextmenu.js | 2 | ||||
-rw-r--r-- | widget/tests/browser/browser_test_clipboardcache.js | 4 | ||||
-rw-r--r-- | widget/tests/browser/browser_test_swipe_gesture.js | 20 |
3 files changed, 15 insertions, 11 deletions
diff --git a/widget/tests/browser/browser_test_clipboard_contextmenu.js b/widget/tests/browser/browser_test_clipboard_contextmenu.js index 4d268d5be4..80e8c33282 100644 --- a/widget/tests/browser/browser_test_clipboard_contextmenu.js +++ b/widget/tests/browser/browser_test_clipboard_contextmenu.js @@ -63,7 +63,7 @@ async function clipboardAsyncGetData(aBrowser, aClipboardType) { "nsIAsyncClipboardGetCallback", ]), // nsIAsyncClipboardGetCallback - onSuccess: aAsyncGetClipboardData => { + onSuccess: () => { resolve(); }, onError: aResult => { diff --git a/widget/tests/browser/browser_test_clipboardcache.js b/widget/tests/browser/browser_test_clipboardcache.js index 8cb6adb8b5..64deb99608 100644 --- a/widget/tests/browser/browser_test_clipboardcache.js +++ b/widget/tests/browser/browser_test_clipboardcache.js @@ -103,6 +103,10 @@ async function testCopyPaste(isPrivate) { document.execCommand("paste"); return pastePromise; }); + + // Don't use Assert.strictEqual here because the test starts timing out, + // because the logging creates lots of copies of this very huge string. + // eslint-disable-next-line mozilla/no-comparison-or-assignment-inside-ok ok(readStr === Ipsum, "Read what we pasted"); if (isPrivate) { diff --git a/widget/tests/browser/browser_test_swipe_gesture.js b/widget/tests/browser/browser_test_swipe_gesture.js index 0ac85d80c8..0f45672206 100644 --- a/widget/tests/browser/browser_test_swipe_gesture.js +++ b/widget/tests/browser/browser_test_swipe_gesture.js @@ -123,9 +123,9 @@ add_task(async () => { computedOpacity = window .getComputedStyle(gHistorySwipeAnimation._prevBox) .getPropertyValue("opacity"); - ok(computedOpacity == 1, "computed opacity of prevbox is 1"); + Assert.equal(computedOpacity, 1, "computed opacity of prevbox is 1"); opacity = gHistorySwipeAnimation._prevBox.style.opacity; - ok(opacity == 0, "element.style opacity of prevbox 0"); + Assert.equal(opacity, 0, "element.style opacity of prevbox 0"); if (isTranslatingIcon) { // We don't have a transition for translate property so that we still have @@ -232,9 +232,9 @@ add_task(async () => { computedOpacity = window .getComputedStyle(gHistorySwipeAnimation._prevBox) .getPropertyValue("opacity"); - ok(computedOpacity == 1, "computed opacity of prevbox is 1"); + Assert.equal(computedOpacity, 1, "computed opacity of prevbox is 1"); opacity = gHistorySwipeAnimation._prevBox.style.opacity; - ok(opacity == 0, "element.style opacity of prevbox 0"); + Assert.equal(opacity, 0, "element.style opacity of prevbox 0"); // Make sure the gesture triggered going back to the previous page. await Promise.all([startLoadingPromise, stoppedLoadingPromise]); @@ -317,9 +317,9 @@ add_task(async () => { let computedOpacity = window .getComputedStyle(gHistorySwipeAnimation._prevBox) .getPropertyValue("opacity"); - ok(computedOpacity == 1, "computed opacity of prevbox is 1"); + Assert.equal(computedOpacity, 1, "computed opacity of prevbox is 1"); let opacity = gHistorySwipeAnimation._prevBox.style.opacity; - ok(opacity == 0, "element.style opacity of prevbox 0"); + Assert.equal(opacity, 0, "element.style opacity of prevbox 0"); // Make sure the gesture triggered going back to the previous page. await Promise.all([startLoadingPromise, stoppedLoadingPromise]); @@ -343,7 +343,7 @@ add_task(async () => { } numTries--; } - ok(numTries > 0, "never ran the test"); + Assert.greater(numTries, 0, "never ran the test"); await SpecialPowers.popPrefEnv(); }); @@ -576,7 +576,7 @@ add_task(async () => { await panLeftToRightBegin(tab.linkedBrowser, 100, 100, 100); - ok(gHistorySwipeAnimation._prevBox != null, "should have prevbox"); + Assert.notEqual(gHistorySwipeAnimation._prevBox, null, "should have prevbox"); let transitionCancelPromise = new Promise(resolve => { gHistorySwipeAnimation._prevBox.addEventListener( "transitioncancel", @@ -635,7 +635,7 @@ add_task(async () => { await panRightToLeftBegin(tab.linkedBrowser, 100, 100, 100); - ok(gHistorySwipeAnimation._nextBox != null, "should have nextbox"); + Assert.notEqual(gHistorySwipeAnimation._nextBox, null, "should have nextbox"); transitionCancelPromise = new Promise(resolve => { gHistorySwipeAnimation._nextBox.addEventListener( "transitioncancel", @@ -1131,7 +1131,7 @@ add_task(async () => { // Set up an APZ aware event listener and... await SpecialPowers.spawn(tab.linkedBrowser, [], async () => { - content.document.documentElement.addEventListener("wheel", e => {}, { + content.document.documentElement.addEventListener("wheel", () => {}, { passive: false, }); await content.wrappedJSObject.promiseApzFlushedRepaints(); |