mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(Response): add Response.fromCache / Response.fromServiceWorker (#1971)
This patch: - introduces `test/assets/cached` folder and teaches server to cache all the assets from the folder - introduces `test/assets/serviceworkers` folder that stores all the service workers and makes them register with unique URL prefix - introduces `Response.fromCache()` and `Response.fromServiceWorker()` methods Fixes #1551.
This commit is contained in:
3
test/assets/serviceworkers/empty/sw.html
Normal file
3
test/assets/serviceworkers/empty/sw.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<script>
|
||||
window.registrationPromise = navigator.serviceWorker.register('sw.js');
|
||||
</script>
|
||||
Reference in New Issue
Block a user