From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../test/fetch/upgrade-insecure/upgrade-insecure_test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 dom/serviceworkers/test/fetch/upgrade-insecure/upgrade-insecure_test.js (limited to 'dom/serviceworkers/test/fetch/upgrade-insecure/upgrade-insecure_test.js') diff --git a/dom/serviceworkers/test/fetch/upgrade-insecure/upgrade-insecure_test.js b/dom/serviceworkers/test/fetch/upgrade-insecure/upgrade-insecure_test.js new file mode 100644 index 0000000000..f79307f4e4 --- /dev/null +++ b/dom/serviceworkers/test/fetch/upgrade-insecure/upgrade-insecure_test.js @@ -0,0 +1,11 @@ +self.addEventListener("fetch", function(event) { + if (event.request.url.includes("index.html")) { + event.respondWith(fetch("realindex.html")); + } else if (event.request.url.includes("image-20px.png")) { + if (event.request.url.indexOf("https://") == 0) { + event.respondWith(fetch("image-40px.png")); + } else { + event.respondWith(Response.error()); + } + } +}); -- cgit v1.2.3