[wpt-sync] Sync PR 32021 - URLPattern: Avoid over-generating '{}' for custom names.
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox97 fixed)
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 32021 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/32021
Details from upstream follow.
Ben Kelly <wanderview@chromium.org> wrote:
URLPattern: Avoid over-generating '{}' for custom names.
This CL fixes a minor issue with a previous change landed to address
the problems in:https://github.com/WICG/urlpattern/issues/145
We previously made a change to produce
{:foo}bar
instead of
:foobar
, etc. That change, however, also emitted the{}
even when
the custom name had a regexp associated with it; e.g.:foo(baz)
.
In that case we don't need the protection of the{}
since the regexp
placement prevents confusion with the following group.This CL fixes this minor issue by checking if the part's type is
kSegmentWildcard. It also adds some tests to validate this behavior.Bug: 1263673
Change-Id: I613009c59a621e394ea697611077bf1fc34c5c43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3328146
Reviewed-by: Jeremy Roman \<jbroman@chromium.org>
Commit-Queue: Ben Kelly \<wanderview@chromium.org>
Cr-Commit-Position: refs/heads/main@{#951229}
Assignee | ||
Comment 1•2 years ago
|
||
PR 32021 applied with additional changes from upstream: ba47328a5138c4fbbc0841dc2f5bf31ab4da0b33, 938a88f9b3121e0f88bfce4baead83af93111cad, 73d24b5e86feab550aa5ab7271a814aaa5882cf7, a36704733a365f09211d1de341c3b208fe473638, 9743972c7c7c0fd8eef8c2b8c2248028e825692b
Assignee | ||
Comment 2•2 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=1e108703040fbef8636ad2b03eddf7c69dacd4be
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/daa8884bd392 [wpt PR 32021] - URLPattern: Avoid over-generating '{}' for custom names., a=testonly
Assignee | ||
Comment 4•2 years ago
|
||
Test result changes from PR not available.
Comment 5•2 years ago
|
||
bugherder |
Description
•