diff options
Diffstat (limited to 'testing/web-platform/tests/web-locks/resources/service-worker.js')
-rw-r--r-- | testing/web-platform/tests/web-locks/resources/service-worker.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/web-platform/tests/web-locks/resources/service-worker.js b/testing/web-platform/tests/web-locks/resources/service-worker.js new file mode 100644 index 0000000000..027863e33e --- /dev/null +++ b/testing/web-platform/tests/web-locks/resources/service-worker.js @@ -0,0 +1,7 @@ +// Responds to '/clientId' with the request's clientId. +self.addEventListener('fetch', e => { + if (new URL(e.request.url).pathname === '/clientId') { + e.respondWith(new Response(JSON.stringify({clientId: e.clientId}))); + return; + } +}); |