KEMBAR78
Update transient activation to match WebKit by marcoscaceres · Pull Request #961 · w3c/payment-request · GitHub
Skip to content

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Aug 12, 2021

Update the spec to match what WebKit does. We can then update Chrome to match.

The following tasks have been completed:

Implementation commitment:

  • Safari - already implemented

Optional, impact on Payment Handler spec?

none


Preview | Diff

Copy link
Collaborator

@stephenmcgruer stephenmcgruer left a comment

Choose a reason for hiding this comment

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

I tried to find some prior art here on whether to throw a NotAllowed or SecurityError, and came up short 😂 . What I did find:

  1. webusb and webbluetooth throw a SecurityError
  2. One other spec I found threw NotAllowedError, but most other specs just quietly return or ignore calls/etc when there is no activation.
  3. We used to throw SecurityError, then switched to NotAllowedError without documented reason that I could find.

So... SecurityError LGTM? Maybe something the web should standardize on ;)

@marcoscaceres
Copy link
Member Author

So... SecurityError LGTM? Maybe something the web should standardize on ;)

I've asked for this too elsewhere, but wasn't successful... as you point out, it's somewhat specific to the API (and if the API throws/rejects or can get away with doing nothing).

@marcoscaceres
Copy link
Member Author

Could someone please also approve the tests? 🙏 web-platform-tests/wpt#30006

@marcoscaceres
Copy link
Member Author

@stephenmcgruer, filed Chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=1239453

Happy to send a patch, but please see my email as I'm not sure how to enable the right flag to trigger that code path.

@marcoscaceres marcoscaceres merged commit ee3dde1 into gh-pages Aug 13, 2021
@marcoscaceres marcoscaceres deleted the user_activation branch August 13, 2021 03:33
stephenmcgruer added a commit to web-platform-tests/wpt that referenced this pull request Aug 13, 2021
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 13, 2021
pull bot pushed a commit to FreddyZeng/chromium that referenced this pull request Aug 14, 2021
The error thrown when user activation is missing was recently changed from
NotAllowedError to SecurityError: w3c/payment-request#961

This change has no effect on shipped Chrome yet as we currently don't throw at
all for missing activation - the logic is hidden behind the capability
delegation flag.

Tested via unittest and via visiting
https://wpt.live/payment-request/show-consume-activation.https.html with
--enable-features=CapabilityDelegationPaymentRequest set.

Bug: 1239453
Change-Id: I14f3874397468ca5da617afa930ffbbe254f1607
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3092912
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#911813}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 15, 2021
…or cases for PaymentRequest.show(), a=testonly

Automatic update from web-platform-tests
Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show() (#30023)

See w3c/payment-request#961
--

wpt-commits: ee2d179bcea6e4a697e89a99a245e4571bd65097
wpt-pr: 30023
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Aug 20, 2021
…or cases for PaymentRequest.show(), a=testonly

Automatic update from web-platform-tests
Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show() (#30023)

See w3c/payment-request#961
--

wpt-commits: ee2d179bcea6e4a697e89a99a245e4571bd65097
wpt-pr: 30023
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jun 1, 2024
…or cases for PaymentRequest.show(), a=testonly

Automatic update from web-platform-tests
Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show() (#30023)

See w3c/payment-request#961
--

wpt-commits: ee2d179bcea6e4a697e89a99a245e4571bd65097
wpt-pr: 30023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants