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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/request-headers-worker.js

Issue 2645363002: Copy the original request header for navigation preload requests (Closed)
Patch Set: Created 3 years, 11 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/navigation-preload/resources/request-headers-scope.php ('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/navigation-preload/resources/request-headers-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/request-headers-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/request-headers-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..1006cf27913a9dfcb77b6be259b299e712d21d05
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/request-headers-worker.js
@@ -0,0 +1,10 @@
+self.addEventListener('activate', event => {
+ event.waitUntil(
+ Promise.all[
+ self.registration.navigationPreload.enable(),
+ self.registration.navigationPreload.setHeaderValue('hello')]);
+ });
+
+self.addEventListener('fetch', event => {
+ event.respondWith(event.preloadResponse);
+ });
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/request-headers-scope.php ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698