Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https.html |
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https.html |
| index 062a41e779dfc7784d8d3c24db9ef90bc1d6ab2b..ba313c5f010b92e0584707da8f3eadf9c7f0b24c 100644 |
| --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https.html |
| +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https.html |
| @@ -8,6 +8,35 @@ |
| var worker = 'resources/fetch-event-test-worker.js'; |
| async_test(function(t) { |
|
Marijn Kruisselbrink
2017/04/27 17:05:23
nit: I suppose this whole file predates the existe
mike3
2017/04/27 18:27:19
Agreed. I'm trying to avoid changes that are not s
|
| + const scope = 'resources/simple.html?headers'; |
| + service_worker_unregister_and_register(t, worker, scope) |
| + .then(function(reg) { |
| + return wait_for_state(t, reg.installing, 'activated'); |
| + }) |
| + .then(function() { return with_iframe(scope); }) |
| + .then(function(frame) { |
| + t.add_cleanup(function() { frame.remove(); }); |
| + const headers = JSON.parse(frame.contentDocument.body.textContent); |
| + const header_names = {}; |
| + for (const [name, value] of headers) { |
| + header_names[name] = true; |
| + } |
| + |
| + assert_true( |
| + header_names.hasOwnProperty('accept'), |
| + 'request includes "Accept" header as inserted by Fetch' |
| + ); |
| + assert_true( |
| + header_names.hasOwnProperty('upgrade-insecure-requests'), |
| + 'request specifies "Upgrade-Insecure Requests header as inserted by Fetch' |
| + ); |
| + |
| + return service_worker_unregister_and_done(t, scope); |
| + }) |
| + .catch(unreached_rejection(t)); |
| + }, 'Service Worker headers in the request of a fetch event'); |
| + |
| +async_test(function(t) { |
| var scope = 'resources/simple.html?string'; |
| service_worker_unregister_and_register(t, worker, scope) |
| .then(function(reg) { |