Closed Bug 1536615 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 15873 - [Payment Request] Fix validation order of PaymentCurrencyAmount.

Categories

(Core :: DOM: Web Payments, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 15873 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15873
Details from upstream follow.

Danyao Wang <danyao@chromium.org> wrote:

[Payment Request] Fix validation order of PaymentCurrencyAmount.

The "check and canonicalize amount" algorithm in the spec requires that
the |currency| field is validated before the |amount| field.
https://w3c.github.io/payment-request/#validity-checkers

Without this patch, Chrome incorrectly throws TypeError instead of
RangeError when both the currency and amount are invalid.

With the patch, Chrome passes the currency validation tests in
https://w3c-test.org/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html

Also fixed a typo in WPT test name.

Bug: 942656
Change-Id: I76b249bc1970740e0c3c9e2309bf2b9ce912450a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526434
Commit-Queue: Rouslan Solomakhin \<rouslan@chromium.org>
Reviewed-by: Rouslan Solomakhin \<rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641586}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Web Payments
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b93d3fe98d1d
[wpt PR 15873] - [Payment Request] Fix validation order of PaymentCurrencyAmount., a=testonly
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e8338c453d7
[wpt PR 15873] - [Payment Request] Fix validation order of PaymentCurrencyAmount., a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.