[Payment] changePaymentMethod should work when details is empty or null
According to PH w3 spec the "details" input of the changePaymentMethod should be optional[1]. Even though payment_request_event.idl honors the spec[2],the blink implementation and the mojom file treat "details" as a mandatory field. This cl fixes the issue. Test coverage: I reproduced the bug by removing the "details" field from changePaymentMethod call[3]; The following two tests pass only after applying the fix in this cl and fail without it: MerchantResponse/PaymentHandlerChangePaymentMethodTest.Test/0 MerchantResponse/PaymentHandlerChangePaymentMethodTest.Test/1 [1]https://w3c.github.io/payment-handler/#the-paymentrequestevent [2]https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/payments/payment_request_event.idl?l=23 [3]https://chromium-review.googlesource.com/c/chromium/src/+/2254084/2/components/test/data/payments/change_payment_method_app.js#32 Bug: 1083193 Change-Id: Ia479401d021be2d110a7a7ad4fe652d2eae4d88c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254084 Commit-Queue: Sahel Sharify <sahel@chromium.org> Reviewed-by:Ken Buchanan <kenrb@chromium.org> Reviewed-by:
Liquan (Max) Gu <maxlg@chromium.org> Cr-Commit-Position: refs/heads/master@{#781380}
Showing
Please register or sign in to comment