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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-worker.js

Issue 712303002: [ServiceWorker] Add LayoutTests for the fallback behavior of FetchEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-worker.js b/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..0e12911d42219dae92650b41e34d8251fc48ddc0
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-worker.js
@@ -0,0 +1,12 @@
+var requests = [];
+
+self.addEventListener('message', function(event) {
+ event.data.port.postMessage({requests: requests});
+ });
+
+self.addEventListener('fetch', function(event) {
+ requests.push({
+ url: event.request.url,
+ mode: event.request.mode
+ });
+ });

Powered by Google App Engine
This is Rietveld 408576698