Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / resources / fetch-request-no-freshness-headers-worker.js
blob2bd59d739225521c863b2fc0c2f87070859e2bd4
1 var requests = [];
3 self.addEventListener('message', function(event) {
4     event.data.port.postMessage({requests: requests});
5   });
7 self.addEventListener('fetch', function(event) {
8     var url = event.request.url;
9     var headers = [];
10     for (var header of event.request.headers) {
11       headers.push(header);
12     }
13     requests.push({
14         url: url,
15         headers: headers
16       });
17     event.respondWith(fetch(event.request));
18   });