summaryrefslogtreecommitdiffstats
path: root/devtools/client/styleeditor/test/iframe_service_worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/styleeditor/test/iframe_service_worker.js')
-rw-r--r--devtools/client/styleeditor/test/iframe_service_worker.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/devtools/client/styleeditor/test/iframe_service_worker.js b/devtools/client/styleeditor/test/iframe_service_worker.js
new file mode 100644
index 0000000000..56c32c204a
--- /dev/null
+++ b/devtools/client/styleeditor/test/iframe_service_worker.js
@@ -0,0 +1,12 @@
+"use strict";
+
+self.onfetch = function (event) {
+ if (event.request.url.includes("sheet.css")) {
+ return event.respondWith(new Response("* { color: green; }"));
+ }
+ return null;
+};
+
+self.onactivate = function (event) {
+ event.waitUntil(self.clients.claim());
+};