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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php

Issue 2245063003: ServiceWorker: Call SyncMatchingRegistration when document_url is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comments Created 4 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 | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php
new file mode 100644
index 0000000000000000000000000000000000000000..bd75fc1345f8499cedbae120976eeeb3513885c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php
@@ -0,0 +1,21 @@
+<?php
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+header('Content-Type:application/javascript');
+
+echo '// ', microtime();
+?>
+
+// This no-op fetch handler is necessary to bypass explicitly the no fetch
+// handler optimization by which this service worker script can be skipped.
+addEventListener('fetch', event => {
+ return;
+ });
+
+addEventListener('install', event => {
+ event.waitUntil(self.skipWaiting());
+ });
+
+addEventListener('activate', event => {
+ event.waitUntil(self.clients.claim());
+ });
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698