Skip to content

Commit

Permalink
Bug 1843478 [wpt PR 41038] - WPT: ServiceWorker static routing API fo…
Browse files Browse the repository at this point in the history
…r subresource loads., a=testonly

Automatic update from web-platform-tests
WPT: ServiceWorker static routing API for subresource loads.

This CL adds the Web Platform Tests to test ServiceWorker static
routing API for subresources.

WICG proposal: WICG/proposals#102
Spec PR: w3c/ServiceWorker#1686

Change-Id: I7379d85b5a2208f248878abe9d1a920ad97d47ab
Bug: 1371756
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4664026
Reviewed-by: Shunya Shishido <sisidovskichromium.org>
Reviewed-by: Minoru Chikamune <chikamunechromium.org>
Reviewed-by: Kouhei Ueno <kouheichromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawachromium.org>
Reviewed-by: Kent Tamura <tkentchromium.org>
Cr-Commit-Position: refs/heads/main{#1171605}

--

wpt-commits: d6ae6c83c103fdf28aefd9fb3445470c96c0e17b
wpt-pr: 41038

UltraBlame original commit: b5f983a66877126f278d41b511c32f703f62f63d
  • Loading branch information
marco-c committed Jul 24, 2023
1 parent 62593d1 commit e9aaa10
Show file tree
Hide file tree
Showing 6 changed files with 2,322 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
A
test
stuite
for
the
ServiceWorker
Static
Routing
API
.
WICG
proposal
:
https
:
/
/
github
.
com
/
WICG
/
proposals
/
issues
/
102
Specification
PR
:
https
:
/
/
github
.
com
/
w3c
/
ServiceWorker
/
pull
/
1686
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Network
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<
!
DOCTYPE
html
>
<
title
>
Simple
<
/
title
>
Here
'
s
a
simple
html
file
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
'
use
strict
'
;
self
.
addEventListener
(
'
install
'
e
=
>
{
e
.
registerRouter
(
{
condition
:
{
urlPattern
:
"
*
.
txt
"
}
source
:
"
network
"
}
)
;
self
.
skipWaiting
(
)
;
}
)
;
self
.
addEventListener
(
'
activate
'
e
=
>
{
e
.
waitUntil
(
clients
.
claim
(
)
)
;
}
)
;
self
.
addEventListener
(
'
fetch
'
function
(
event
)
{
const
url
=
new
URL
(
event
.
request
.
url
)
;
const
nonce
=
url
.
searchParams
.
get
(
'
nonce
'
)
;
event
.
respondWith
(
new
Response
(
nonce
)
)
;
}
)
;
Loading

0 comments on commit e9aaa10

Please sign in to comment.