Bug
1700421 [wpt PR 28192] - URLPattern: Allow a second argument to test()/exec() for baseURL., a=testonly
Automatic update from web-platform-tests
URLPattern: Allow a second argument to test()/exec() for baseURL.
This CL adds support for code to pass a secondary argument to test()
and exec() to act as a baseURL. For example:
pattern.test('./index.html', self.location);
To support this the webidl was restructured to have separate method
overloads for USVString and URLPatternInit inputs. In addition, the
internal implementation was refactored to account for the fact that
a union type is no longer used for the input.
Finally, there was one open question about what to reflect in the
`input` property on the URLPatternResult returned from exec(). This
property contains the input passed to exec(). In the past this was
always a single value, but now there are two values. This CL deals
with the situation by populating `result.input` with the fully resolved
URL when a baseURL is present. This is a bit inconsistent with the
value when populated in other cases, but seems less weird than trying
to use an array or secondary property.
Bug:
1141510
Change-Id: Ia247f59b1541ca254ba7d1d871f64d65a7b0b7e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
2779364
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#865794}
--
wpt-commits:
0d7dd845ec0c0482cbd8c11bddafe9878dc32522
wpt-pr: 28192