summaryrefslogtreecommitdiffstats
path: root/dom/security/test/https-only/browser_save_as.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/security/test/https-only/browser_save_as.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/security/test/https-only/browser_save_as.js')
-rw-r--r--dom/security/test/https-only/browser_save_as.js14
1 files changed, 9 insertions, 5 deletions
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);
});