[wpt-sync] Sync PR 32650 - URLPattern: Set unmatched optional groups to undefined instead of ''.
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox99 fixed)
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
(deleted),
text/plain
|
Details |
Sync web-platform-tests PR 32650 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/32650
Details from upstream follow.
Ben Kelly <wanderview@chromium.org> wrote:
URLPattern: Set unmatched optional groups to undefined instead of ''.
This addresses the issues raised in:
https://github.com/WICG/urlpattern/issues/162
The main changes in this CL are:
- The webidl is modified to allow passed back undefined. I'm told
real webidl should support(USVString or undefined)
here, but our
webidl compiler does not support that. So we useany
instead.- We must examine if the WTF::String is null or not before populating
the returned array. If its null, then we convert to undefined
instead.It turned out, however, that StringUTF8Adaptor was also converting
empty strings to null strings. It was necessary to fix this in order
to return undefined and empty string in the correct places in the
returned values.Bug: 1292699
Change-Id: I27a0be2567bb9ce4592ca15a5216fd5a58bdbf17Reviewed-on: https://chromium-review.googlesource.com/3428631
WPT-Export-Revision: 6529fafa0ff5eeafa06e59522494d913a4f0c254
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Comment 6•3 years ago
|
||
bugherder |
Description
•