From 0ad84a48dd03f6e3d3fb45cc4977649a48afd8e4 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Mon, 9 Aug 2021 14:26:37 +0000 Subject: [PATCH] Bug 1723080: Update worker tests within dom/ to work with https-first enabled r=baku Differential Revision: https://phabricator.services.mozilla.com/D121340 --- dom/serviceworkers/test/browser_remote_type_process_swap.js | 2 +- dom/serviceworkers/test/test_origin_after_redirect.html | 1 + dom/serviceworkers/test/test_origin_after_redirect_cached.html | 1 + dom/workers/test/browser_bug1047663.js | 1 + dom/workers/test/head.js | 2 -- 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dom/serviceworkers/test/browser_remote_type_process_swap.js b/dom/serviceworkers/test/browser_remote_type_process_swap.js index b1824a71448e..60c8078e0d86 100644 --- a/dom/serviceworkers/test/browser_remote_type_process_swap.js +++ b/dom/serviceworkers/test/browser_remote_type_process_swap.js @@ -30,7 +30,7 @@ const FILE_URL = (() => { return Services.io.newFileURI(file).spec; })(); -const CROSS_ORIGIN = "http://example.com"; +const CROSS_ORIGIN = "https://example.com"; const CROSS_ORIGIN_URL = SW_REGISTER_PAGE_URL.replace(ORIGIN, CROSS_ORIGIN); const CROSS_ORIGIN_REDIRECT_URL = `${TEST_ROOT}redirect.sjs?${CROSS_ORIGIN_URL}`; diff --git a/dom/serviceworkers/test/test_origin_after_redirect.html b/dom/serviceworkers/test/test_origin_after_redirect.html index f3cddfb45033..e4c0af23bea4 100644 --- a/dom/serviceworkers/test/test_origin_after_redirect.html +++ b/dom/serviceworkers/test/test_origin_after_redirect.html @@ -49,6 +49,7 @@ ["dom.serviceWorkers.enabled", true], ["dom.serviceWorkers.testing.enabled", true], ["dom.caches.enabled", true], + ["dom.security.https_first", false], ]}, runTest); }; diff --git a/dom/serviceworkers/test/test_origin_after_redirect_cached.html b/dom/serviceworkers/test/test_origin_after_redirect_cached.html index af9b47db6464..ca79581ccf0f 100644 --- a/dom/serviceworkers/test/test_origin_after_redirect_cached.html +++ b/dom/serviceworkers/test/test_origin_after_redirect_cached.html @@ -49,6 +49,7 @@ ["dom.serviceWorkers.enabled", true], ["dom.serviceWorkers.testing.enabled", true], ["dom.caches.enabled", true], + ["dom.security.https_first", false], ]}, runTest); }; diff --git a/dom/workers/test/browser_bug1047663.js b/dom/workers/test/browser_bug1047663.js index a52d5cdf2dde..9c29c23d9e4b 100644 --- a/dom/workers/test/browser_bug1047663.js +++ b/dom/workers/test/browser_bug1047663.js @@ -3,6 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; +const EXAMPLE_URL = "https://example.com/browser/dom/workers/test/"; const TAB_URL = EXAMPLE_URL + "bug1047663_tab.html"; const WORKER_URL = EXAMPLE_URL + "bug1047663_worker.sjs"; diff --git a/dom/workers/test/head.js b/dom/workers/test/head.js index 99fab2985e13..00a9cd62ca3d 100644 --- a/dom/workers/test/head.js +++ b/dom/workers/test/head.js @@ -3,8 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -const EXAMPLE_URL = "http://example.com/browser/dom/workers/test/"; - /** * Add a tab with given `url`. Returns a promise * that will be resolved when the tab finished loading.