Bug
1845951 [wpt PR 41226] - Allow urlPattern field to take URLPatternInit., a=testonly
Automatic update from web-platform-tests
Allow urlPattern field to take URLPatternInit.
This is something told in:
https://github.com/yoshisatoyanagisawa/service-worker-static-routing-api/blob/main/final-form.md
To allow people to write a complex pattern and make URLPattern
understand it, let me make URLPatternInit also supported.
With this way, people can write like:
condition: {
urlPattern: new URLPattern("*://example.com/*.ico")
}
With this change, we also changed the string URLPattern behavior.
It used to be thought as the pathname URL pattern.
i.e. equivalent behavior to:
URLPattern({pathname: "<given argument>"}).
However, now it silently sets the ServiceWorker script's base URL
as the base URL.
i.e. URLPattern({pathname: "<given argument>"}, <script base URL>)
Bug:
1371756
Change-Id: I1f94e27f0dd76bbeb372878f3a9692fa094da8c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
4685593
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1177617}
--
wpt-commits:
8480d18f4bb810be5c8efc77f87daeb39c2300fb
wpt-pr: 41226