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

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

Issue 1280243002: Add layout tests for Service Worker fallbacked subresource requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated falken's comment Created 5 years, 4 months 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
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index 0e12911d42219dae92650b41e34d8251fc48ddc0..aeb63eab8c70db6280b40f58e31bb5a3f7e7f263 100644
--- a/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-worker.js
+++ b/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-worker.js
@@ -1,7 +1,10 @@
+// TODO(horo): Service worker can be killed at some point during the test. So we
+// should use storage API instead of this global variable.
var requests = [];
self.addEventListener('message', function(event) {
event.data.port.postMessage({requests: requests});
+ requests = [];
});
self.addEventListener('fetch', function(event) {
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698