diff options
Diffstat (limited to 'layout/base/tests/chrome/printpreview_images_sw.js')
-rw-r--r-- | layout/base/tests/chrome/printpreview_images_sw.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/layout/base/tests/chrome/printpreview_images_sw.js b/layout/base/tests/chrome/printpreview_images_sw.js new file mode 100644 index 0000000000..bb0ab60b1f --- /dev/null +++ b/layout/base/tests/chrome/printpreview_images_sw.js @@ -0,0 +1,11 @@ +self.addEventListener("fetch", event => { + if (event.request.url.includes("nonexistent.png")) { + event.respondWith( + fetch(event.request.url.replace("nonexistent.png", "blue-32x32.png")) + ); + } +}); + +self.addEventListener("activate", event => { + event.waitUntil(clients.claim()); +}); |