chromium/third_party/blink/web_tests/external/wpt/service-workers/service-worker/navigation-preload/resources/request-headers-worker.js

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);
  });