Index: LayoutTests/http/tests/cachestorage/resources/common-worker.js |
diff --git a/LayoutTests/http/tests/cachestorage/resources/common-worker.js b/LayoutTests/http/tests/cachestorage/resources/common-worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d0e8544b56c2677a9c60d47a9e8b587d63bc6d6c |
--- /dev/null |
+++ b/LayoutTests/http/tests/cachestorage/resources/common-worker.js |
@@ -0,0 +1,15 @@ |
+self.onmessage = function(e) { |
+ var cache_name = e.data.name; |
+ |
+ self.caches.open(cache_name) |
+ .then(function(cache) { |
+ return Promise.all([ |
+ cache.put('https://example.com/a', new Response('a')), |
+ cache.put('https://example.com/b', new Response('b')), |
+ cache.put('https://example.com/c', new Response('c')) |
+ ]); |
+ }) |
+ .then(function() { |
+ self.postMessage('ok'); |
+ }); |
+}; |