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 --- .../webconsole/test/chrome/helper_serviceworker.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 devtools/shared/webconsole/test/chrome/helper_serviceworker.js (limited to 'devtools/shared/webconsole/test/chrome/helper_serviceworker.js') diff --git a/devtools/shared/webconsole/test/chrome/helper_serviceworker.js b/devtools/shared/webconsole/test/chrome/helper_serviceworker.js new file mode 100644 index 0000000000..74092183e2 --- /dev/null +++ b/devtools/shared/webconsole/test/chrome/helper_serviceworker.js @@ -0,0 +1,21 @@ +"use strict"; + +console.log("script evaluation"); + +addEventListener("install", function (evt) { + console.log("install event"); +}); + +addEventListener("activate", function (evt) { + console.log("activate event"); +}); + +addEventListener("fetch", function (evt) { + console.log("fetch event: " + evt.request.url); + evt.respondWith(new Response("Hello world")); +}); + +addEventListener("message", function (evt) { + console.log("message event: " + evt.data.message); + evt.source.postMessage({ type: "PONG" }); +}); -- cgit v1.2.3