Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/navigation-redirect-body-worker.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/navigation-redirect-body-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/navigation-redirect-body-worker.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..39f11baf8cb965988cf6a2f0abf914b1484ec63c |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/navigation-redirect-body-worker.js |
| @@ -0,0 +1,11 @@ |
| +self.addEventListener('fetch', function(event) { |
| + event.respondWith( |
| + fetch(event.request) |
| + .then( |
| + function(response) { |
| + return response; |
| + }, |
| + function(error) { |
| + return new Response('Error:' + error); |
| + })); |
| + }); |