From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- dom/serviceworkers/test/thirdparty/iframe1.html | 42 ++++++++++++++++++++++ dom/serviceworkers/test/thirdparty/iframe2.html | 14 ++++++++ dom/serviceworkers/test/thirdparty/register.html | 29 +++++++++++++++ dom/serviceworkers/test/thirdparty/sw.js | 33 +++++++++++++++++ dom/serviceworkers/test/thirdparty/unregister.html | 19 ++++++++++ dom/serviceworkers/test/thirdparty/worker.js | 1 + 6 files changed, 138 insertions(+) create mode 100644 dom/serviceworkers/test/thirdparty/iframe1.html create mode 100644 dom/serviceworkers/test/thirdparty/iframe2.html create mode 100644 dom/serviceworkers/test/thirdparty/register.html create mode 100644 dom/serviceworkers/test/thirdparty/sw.js create mode 100644 dom/serviceworkers/test/thirdparty/unregister.html create mode 100644 dom/serviceworkers/test/thirdparty/worker.js (limited to 'dom/serviceworkers/test/thirdparty') diff --git a/dom/serviceworkers/test/thirdparty/iframe1.html b/dom/serviceworkers/test/thirdparty/iframe1.html new file mode 100644 index 0000000000..e8982d306a --- /dev/null +++ b/dom/serviceworkers/test/thirdparty/iframe1.html @@ -0,0 +1,42 @@ + + + + + SW third party iframe test + + + + + + + + + + + diff --git a/dom/serviceworkers/test/thirdparty/iframe2.html b/dom/serviceworkers/test/thirdparty/iframe2.html new file mode 100644 index 0000000000..8013899195 --- /dev/null +++ b/dom/serviceworkers/test/thirdparty/iframe2.html @@ -0,0 +1,14 @@ + + diff --git a/dom/serviceworkers/test/thirdparty/register.html b/dom/serviceworkers/test/thirdparty/register.html new file mode 100644 index 0000000000..b166acb8a4 --- /dev/null +++ b/dom/serviceworkers/test/thirdparty/register.html @@ -0,0 +1,29 @@ + + diff --git a/dom/serviceworkers/test/thirdparty/sw.js b/dom/serviceworkers/test/thirdparty/sw.js new file mode 100644 index 0000000000..0ecd801106 --- /dev/null +++ b/dom/serviceworkers/test/thirdparty/sw.js @@ -0,0 +1,33 @@ +self.addEventListener("fetch", function (event) { + dump("fetch " + event.request.url + "\n"); + if (event.request.url.includes("iframe2.html")) { + var body = + ""; + event.respondWith( + new Response(body, { + headers: { "Content-Type": "text/html" }, + }) + ); + return; + } + if (event.request.url.includes("worker.js")) { + var body = "self.postMessage('worker-swresponse');"; + event.respondWith( + new Response(body, { + headers: { "Content-Type": "application/javascript" }, + }) + ); + return; + } +}); diff --git a/dom/serviceworkers/test/thirdparty/unregister.html b/dom/serviceworkers/test/thirdparty/unregister.html new file mode 100644 index 0000000000..65b29d5648 --- /dev/null +++ b/dom/serviceworkers/test/thirdparty/unregister.html @@ -0,0 +1,19 @@ + + diff --git a/dom/serviceworkers/test/thirdparty/worker.js b/dom/serviceworkers/test/thirdparty/worker.js new file mode 100644 index 0000000000..bbdc608cde --- /dev/null +++ b/dom/serviceworkers/test/thirdparty/worker.js @@ -0,0 +1 @@ +self.postMessage("worker-networkresponse"); -- cgit v1.2.3