From e6f16600d281ff0ed762ca0bf662534ad89c996e Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Fri, 30 Jul 2021 14:05:44 +0000 Subject: [PATCH] Bug 1723088: Update tests within dom/manifest to work with https-first enabled r=baku Differential Revision: https://phabricator.services.mozilla.com/D121350 --- dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js | 2 +- dom/manifest/test/browser_ManifestObtainer_credentials.js | 6 +++--- dom/manifest/test/browser_ManifestObtainer_obtain.js | 1 + .../test/cookie_setter_with_credentials_cross_origin.html | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js b/dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js index 3b07153b6247..0270a8340200 100644 --- a/dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js +++ b/dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js @@ -10,7 +10,7 @@ const { ManifestObtainer } = ChromeUtils.import( ); const defaultURL = new URL( - "http://example.org/browser/dom/manifest/test/resource.sjs" + "https://example.org/browser/dom/manifest/test/resource.sjs" ); defaultURL.searchParams.set("Content-Type", "application/manifest+json"); diff --git a/dom/manifest/test/browser_ManifestObtainer_credentials.js b/dom/manifest/test/browser_ManifestObtainer_credentials.js index 1d20d3dc4828..22304aa1c6ad 100644 --- a/dom/manifest/test/browser_ManifestObtainer_credentials.js +++ b/dom/manifest/test/browser_ManifestObtainer_credentials.js @@ -9,7 +9,7 @@ const { ManifestObtainer } = ChromeUtils.import( // Don't send cookies add_task(async function() { const testPath = "/browser/dom/manifest/test/cookie_setter.html"; - const tabURL = `http://example.com:80${testPath}`; + const tabURL = `https://example.com${testPath}`; const browser = BrowserTestUtils.addTab(gBrowser, tabURL).linkedBrowser; await BrowserTestUtils.browserLoaded(browser); const { short_name } = await ManifestObtainer.browserObtainManifest(browser); @@ -22,7 +22,7 @@ add_task(async function() { add_task(async function() { const testPath = "/browser/dom/manifest/test/cookie_setter_with_credentials.html"; - const tabURL = `http://example.com:80${testPath}`; + const tabURL = `https://example.com${testPath}`; const browser = BrowserTestUtils.addTab(gBrowser, tabURL).linkedBrowser; await BrowserTestUtils.browserLoaded(browser); const { short_name } = await ManifestObtainer.browserObtainManifest(browser); @@ -35,7 +35,7 @@ add_task(async function() { add_task(async function() { const testPath = "/browser/dom/manifest/test/cookie_setter_with_credentials_cross_origin.html"; - const tabURL = `http://example.com:80${testPath}`; + const tabURL = `https://example.com${testPath}`; const browser = BrowserTestUtils.addTab(gBrowser, tabURL).linkedBrowser; await BrowserTestUtils.browserLoaded(browser); const { short_name } = await ManifestObtainer.browserObtainManifest(browser); diff --git a/dom/manifest/test/browser_ManifestObtainer_obtain.js b/dom/manifest/test/browser_ManifestObtainer_obtain.js index 82578de1040b..fa8f25619cbb 100644 --- a/dom/manifest/test/browser_ManifestObtainer_obtain.js +++ b/dom/manifest/test/browser_ManifestObtainer_obtain.js @@ -1,6 +1,7 @@ "use strict"; Services.prefs.setBoolPref("dom.manifest.enabled", true); +Services.prefs.setBoolPref("dom.security.https_first", false); const { ManifestObtainer } = ChromeUtils.import( "resource://gre/modules/ManifestObtainer.jsm" diff --git a/dom/manifest/test/cookie_setter_with_credentials_cross_origin.html b/dom/manifest/test/cookie_setter_with_credentials_cross_origin.html index 7033de0d5971..6d1c4045c392 100644 --- a/dom/manifest/test/cookie_setter_with_credentials_cross_origin.html +++ b/dom/manifest/test/cookie_setter_with_credentials_cross_origin.html @@ -10,5 +10,5 @@ -->