Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1762)

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/common-worker.js

Issue 2517743002: Import wpt@5a1f188e0536ad023936cc62f9a00617299dc192 (Closed)
Patch Set: rebased Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/common-worker.js
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/common-worker.js b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/common-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..d0e8544b56c2677a9c60d47a9e8b587d63bc6d6c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/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');
+ });
+};

Powered by Google App Engine
This is Rietveld 408576698