-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1695941 [wpt PR 27857] - WPT:
Sec-Fetch-*
headers aren't access…
…ible in service workers., a=testonly Automatic update from web-platform-tests WPT: `Sec-Fetch-*` headers aren't accessible in service workers. As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <falkenchromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/master{#859345} -- wpt-commits: df6a144d964283f2929eeb937af2806d9aafec62 wpt-pr: 27857 UltraBlame original commit: cc8aa5885f9fc1c5d8b014047501861d5af169e6
- Loading branch information
Showing
3 changed files
with
559 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
testing/web-platform/tests/fetch/metadata/resources/serviceworker-accessors-frame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
< | ||
! | ||
DOCTYPE | ||
html | ||
> | ||
< | ||
meta | ||
charset | ||
= | ||
" | ||
utf | ||
- | ||
8 | ||
" | ||
> | ||
< | ||
title | ||
> | ||
Page | ||
Title | ||
< | ||
/ | ||
title | ||
> |
143 changes: 143 additions & 0 deletions
143
testing/web-platform/tests/fetch/metadata/resources/serviceworker-accessors.sw.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
addEventListener | ||
( | ||
" | ||
fetch | ||
" | ||
event | ||
= | ||
> | ||
{ | ||
event | ||
. | ||
waitUntil | ||
( | ||
async | ||
function | ||
( | ||
) | ||
{ | ||
if | ||
( | ||
! | ||
event | ||
. | ||
clientId | ||
) | ||
return | ||
; | ||
const | ||
client | ||
= | ||
await | ||
clients | ||
. | ||
get | ||
( | ||
event | ||
. | ||
clientId | ||
) | ||
; | ||
if | ||
( | ||
! | ||
client | ||
) | ||
return | ||
; | ||
client | ||
. | ||
postMessage | ||
( | ||
{ | ||
" | ||
dest | ||
" | ||
: | ||
event | ||
. | ||
request | ||
. | ||
headers | ||
. | ||
get | ||
( | ||
" | ||
sec | ||
- | ||
fetch | ||
- | ||
dest | ||
" | ||
) | ||
" | ||
mode | ||
" | ||
: | ||
event | ||
. | ||
request | ||
. | ||
headers | ||
. | ||
get | ||
( | ||
" | ||
sec | ||
- | ||
fetch | ||
- | ||
mode | ||
" | ||
) | ||
" | ||
site | ||
" | ||
: | ||
event | ||
. | ||
request | ||
. | ||
headers | ||
. | ||
get | ||
( | ||
" | ||
sec | ||
- | ||
fetch | ||
- | ||
site | ||
" | ||
) | ||
" | ||
user | ||
" | ||
: | ||
event | ||
. | ||
request | ||
. | ||
headers | ||
. | ||
get | ||
( | ||
" | ||
sec | ||
- | ||
fetch | ||
- | ||
user | ||
" | ||
) | ||
} | ||
) | ||
; | ||
} | ||
( | ||
) | ||
) | ||
; | ||
} | ||
) | ||
; |
Oops, something went wrong.