diff options
Diffstat (limited to 'devtools/client/netmonitor/test/service-workers/status-codes-service-worker.js')
-rw-r--r-- | devtools/client/netmonitor/test/service-workers/status-codes-service-worker.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/devtools/client/netmonitor/test/service-workers/status-codes-service-worker.js b/devtools/client/netmonitor/test/service-workers/status-codes-service-worker.js new file mode 100644 index 000000000..3c70c7dcb --- /dev/null +++ b/devtools/client/netmonitor/test/service-workers/status-codes-service-worker.js @@ -0,0 +1,15 @@ +/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +self.addEventListener("activate", event => { + // start controlling the already loaded page + event.waitUntil(self.clients.claim()); +}); + +self.addEventListener("fetch", event => { + let response = new Response("Service worker response"); + event.respondWith(response); +}); |