From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/security/test/https-only/browser_hsts_host.js | 2 +- dom/security/test/https-only/browser_save_as.js | 14 +++++++++----- dom/security/test/https-only/browser_user_gesture.js | 2 +- dom/security/test/https-only/file_upgrade_insecure.html | 2 +- .../test/https-only/file_websocket_exceptions_iframe.html | 6 +++--- dom/security/test/https-only/test_redirect_upgrade.html | 4 ++-- dom/security/test/https-only/test_resource_upgrade.html | 2 +- 7 files changed, 18 insertions(+), 14 deletions(-) (limited to 'dom/security/test/https-only') diff --git a/dom/security/test/https-only/browser_hsts_host.js b/dom/security/test/https-only/browser_hsts_host.js index 858c19865c..c612606f72 100644 --- a/dom/security/test/https-only/browser_hsts_host.js +++ b/dom/security/test/https-only/browser_hsts_host.js @@ -146,7 +146,7 @@ add_task(async function () { Services.obs.removeObserver(observer, "http-on-examine-response"); }); -function observer(subject, topic, state) { +function observer(subject, topic) { info("observer called with " + topic); if (topic == "http-on-examine-response") { onExamineResponse(subject); diff --git a/dom/security/test/https-only/browser_save_as.js b/dom/security/test/https-only/browser_save_as.js index 309dd69c79..fbfdf276a8 100644 --- a/dom/security/test/https-only/browser_save_as.js +++ b/dom/security/test/https-only/browser_save_as.js @@ -14,7 +14,7 @@ const TEST_PATH = "http://example.com/browser/dom/security/test/https-only/file_save_as.html"; let MockFilePicker = SpecialPowers.MockFilePicker; -MockFilePicker.init(window); +MockFilePicker.init(window.browsingContext); const tempDir = createTemporarySaveDirectory(); MockFilePicker.displayDirectory = tempDir; @@ -78,7 +78,7 @@ function createPromiseForTransferComplete() { } function createPromiseForConsoleError(message) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { function listener(msgObj) { let text = msgObj.message; if (text.includes(message)) { @@ -155,7 +155,11 @@ async function setHttpsFirstAndOnlyPrefs(httpsFirst, httpsOnly) { add_task(async function testBaseline() { // Run with HTTPS-First and HTTPS-Only disabled await setHttpsFirstAndOnlyPrefs(false, false); - await runTest("#insecure-link", HTTP_LINK, undefined); + await runTest( + "#insecure-link", + HTTP_LINK, + "We blocked a download that’s not secure: “http://example.org/”." + ); await runTest("#secure-link", HTTPS_LINK, undefined); }); @@ -169,7 +173,7 @@ add_task(async function testHttpsFirst() { await runTest( "#insecure-link", HTTP_LINK, - "Blocked downloading insecure content “http://example.org/”." + "We blocked a download that’s not secure: “http://example.org/”." ); await runTest("#secure-link", HTTPS_LINK, undefined); }); @@ -181,7 +185,7 @@ add_task(async function testHttpsOnly() { await runTest( "#insecure-link", HTTP_LINK, - "Blocked downloading insecure content “http://example.org/”." + "We blocked a download that’s not secure: “http://example.org/”." ); await runTest("#secure-link", HTTPS_LINK, undefined); }); diff --git a/dom/security/test/https-only/browser_user_gesture.js b/dom/security/test/https-only/browser_user_gesture.js index e7d6a20318..9eec10bd88 100644 --- a/dom/security/test/https-only/browser_user_gesture.js +++ b/dom/security/test/https-only/browser_user_gesture.js @@ -23,7 +23,7 @@ add_task(async function () { // 1. Upgrade a page to https:// BrowserTestUtils.startLoadingURIString(browser, kTestURI); await loaded; - await ContentTask.spawn(browser, {}, async args => { + await ContentTask.spawn(browser, {}, async () => { ok( content.document.location.href.startsWith("https://"), "Should be https" diff --git a/dom/security/test/https-only/file_upgrade_insecure.html b/dom/security/test/https-only/file_upgrade_insecure.html index 346cfbeb9c..b2d3b89e3d 100644 --- a/dom/security/test/https-only/file_upgrade_insecure.html +++ b/dom/security/test/https-only/file_upgrade_insecure.html @@ -55,7 +55,7 @@ ); if (AppConstants.platform !== "android") { var mySocket = new WebSocket("ws://example.com/tests/dom/security/test/https-only/file_upgrade_insecure"); - mySocket.onopen = function(e) { + mySocket.onopen = function() { if (mySocket.url.includes("wss://")) { window.parent.postMessage({result: "websocket-ok"}, "*"); } diff --git a/dom/security/test/https-only/file_websocket_exceptions_iframe.html b/dom/security/test/https-only/file_websocket_exceptions_iframe.html index 23c6af2d45..d8d0046119 100644 --- a/dom/security/test/https-only/file_websocket_exceptions_iframe.html +++ b/dom/security/test/https-only/file_websocket_exceptions_iframe.html @@ -5,17 +5,17 @@