Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLPattern: Revamp baseURL second argument approach. #28252

Merged
merged 1 commit into from Mar 30, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 25, 2021

This CL revamps our approach to using a second argument for baseURL.
The changes include:

  • Using a union type in the webidl so we can throw an informative
    exception instead of silently coercing an object to a string that
    always fails.
  • Exposing the original input values in URLPatternResult.inputs. The
    old input property is now accessed as inputs[0].
  • WPT test harness uses inputs to determine what to pass to test()
    and exec(). This replaces the old input and inputBaseURL
    properties.
  • WPT test harness automatically validates the result inputs matches
    the argument inputs. Many duplicative input lines are removed
    as they are no longer needed.
  • WPT test allows expected_match: 'error' to indicate that test()
    and exec() are expected to throw TypeError exceptions.
  • WPT test removes error: true in favor of expected_obj: 'error' in
    order to match the behavior above for match errors.

Bug: 1141510
Change-Id: I3574393a965678595dd67d59931f9ec72338f346
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2785414
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#867723}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

This CL revamps our approach to using a second argument for baseURL.
The changes include:

* Using a union type in the webidl so we can throw an informative
  exception instead of silently coercing an object to a string that
  always fails.
* Exposing the original input values in `URLPatternResult.inputs`.  The
  old `input` property is now accessed as `inputs[0]`.
* WPT test harness uses `inputs` to determine what to pass to `test()`
  and `exec()`.  This replaces the old `input` and `inputBaseURL`
  properties.
* WPT test harness automatically validates the result `inputs` matches
  the argument `inputs`.  Many duplicative `input` lines are removed
  as they are no longer needed.
* WPT test allows `expected_match: 'error'` to indicate that `test()`
  and `exec()` are expected to throw TypeError exceptions.
* WPT test removes `error: true` in favor of `expected_obj: 'error'` in
  order to match the behavior above for match errors.

Bug: 1141510
Change-Id: I3574393a965678595dd67d59931f9ec72338f346
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2785414
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#867723}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants