diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /toolkit/components/printing/tests | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/printing/tests')
3 files changed, 9 insertions, 7 deletions
diff --git a/toolkit/components/printing/tests/browser_preview_navigation.js b/toolkit/components/printing/tests/browser_preview_navigation.js index 53e54eddb0..23b3a9b7cc 100644 --- a/toolkit/components/printing/tests/browser_preview_navigation.js +++ b/toolkit/components/printing/tests/browser_preview_navigation.js @@ -23,7 +23,7 @@ async function waitForPageStatusUpdate(elem, expected, message) { ); } -async function waitUntilVisible(elem, visible = true) { +async function waitUntilVisible(elem) { await TestUtils.waitForCondition( () => BrowserTestUtils.isVisible(elem) && getComputedStyle(elem).opacity == "1", diff --git a/toolkit/components/printing/tests/file_window_print_reentrant.html b/toolkit/components/printing/tests/file_window_print_reentrant.html index 7eebd8c2fe..2008ffaf27 100644 --- a/toolkit/components/printing/tests/file_window_print_reentrant.html +++ b/toolkit/components/printing/tests/file_window_print_reentrant.html @@ -3,7 +3,7 @@ <script> let count = 0; onload = function() { - window.addEventListener('beforeprint', (event) => { + window.addEventListener('beforeprint', () => { document.getElementById("before-print-count").innerText = ++count; print() }); diff --git a/toolkit/components/printing/tests/head.js b/toolkit/components/printing/tests/head.js index 4c8c0b26b6..e2a83463a6 100644 --- a/toolkit/components/printing/tests/head.js +++ b/toolkit/components/printing/tests/head.js @@ -60,6 +60,9 @@ class PrintHelper { } static getTestPageUrl(pathName) { + if (pathName.startsWith("http://")) { + return pathName; + } const testPath = getRootDirectory(gTestPath).replace( "chrome://mochitests/content", "http://example.com" @@ -68,6 +71,9 @@ class PrintHelper { } static getTestPageUrlHTTPS(pathName) { + if (pathName.startsWith("https://")) { + return pathName; + } const testPath = getRootDirectory(gTestPath).replace( "chrome://mochitests/content", "https://example.com" @@ -232,11 +238,7 @@ class PrintHelper { }); // Mock PrintEventHandler with our Promises. - this.win.PrintEventHandler._showPrintDialog = ( - window, - haveSelection, - settings - ) => { + this.win.PrintEventHandler._showPrintDialog = (window, haveSelection) => { this.systemDialogOpenedWithSelection = haveSelection; return showSystemDialogPromise; }; |