Closed Bug 1753125 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 32650 - URLPattern: Set unmatched optional groups to undefined instead of ''.

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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:

  1. 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 use any instead.
  2. 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: I27a0be2567bb9ce4592ca15a5216fd5a58bdbf17

Reviewed-on: https://chromium-review.googlesource.com/3428631
WPT-Export-Revision: 6529fafa0ff5eeafa06e59522494d913a4f0c254

Attached file Notable wpt changes
# CI Results Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI Total 8 tests and 329 subtests ## Status Summary ### Firefox OK : 8 PASS : 8 FAIL : 2624 ### Chrome OK : 8 PASS : 2552 FAIL : 80 ### Safari OK : 6 PASS : 6 FAIL : 1968 ERROR: 2 ## Links [GitHub PR Head](https://wpt.fyi/results/?sha=32a0db4146ad031ed7311f3e22b721516eec67d8&label=pr_head) [GitHub PR Base](https://wpt.fyi/results/?sha=32a0db4146ad031ed7311f3e22b721516eec67d8&label=pr_base) ## Details (See attachment for full changes)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b6d3cb953ea3 [wpt PR 32650] - URLPattern: Set unmatched optional groups to undefined instead of ''., a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5253744cc1d [wpt PR 32650] - URLPattern: Set unmatched optional groups to undefined instead of ''., a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: