summaryrefslogtreecommitdiffstats
path: root/toolkit/components/printing/tests
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/printing/tests')
-rw-r--r--toolkit/components/printing/tests/browser_preview_navigation.js2
-rw-r--r--toolkit/components/printing/tests/file_window_print_reentrant.html2
-rw-r--r--toolkit/components/printing/tests/head.js12
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;
};