Skip to content

Payment Handler: Add test for OperationError propagation#59002

Merged
stephenmcgruer merged 7 commits intomasterfrom
smcgruer/web-based-payment-handler-operation-error
Apr 23, 2026
Merged

Payment Handler: Add test for OperationError propagation#59002
stephenmcgruer merged 7 commits intomasterfrom
smcgruer/web-based-payment-handler-operation-error

Conversation

@stephenmcgruer
Copy link
Copy Markdown
Contributor

This change adds a new manual test to verify that if a web-based payment handler rejects the promise passed to respondWith with an OperationError, the original PaymentRequest.show() call also rejects with an OperationError.

For other error types (like SyntaxError), show() should still reject with an AbortError.

Spec: w3c/web-based-payment-handler#428

This change adds a new manual test to verify that if a web-based payment
handler rejects the promise passed to respondWith with an OperationError,
the original PaymentRequest.show() call also rejects with an OperationError.

For other error types (like SyntaxError), show() should still reject with
an AbortError.

Spec: w3c/web-based-payment-handler#428
@stephenmcgruer
Copy link
Copy Markdown
Contributor Author

Having some trouble verifying that the test works atm because of WPT issues, but PTAL.

@stephenmcgruer
Copy link
Copy Markdown
Contributor Author

Ok, confirmed these manual tests pass with the Chrome implementation changes for w3c/web-based-payment-handler#429 patched in. Otherwise the first test fails and the second passes, as would be expected.

@stephenmcgruer stephenmcgruer merged commit 5bc4843 into master Apr 23, 2026
25 checks passed
@stephenmcgruer stephenmcgruer deleted the smcgruer/web-based-payment-handler-operation-error branch April 23, 2026 10:35
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.

4 participants