Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Issue 2864013002: Verify behavior of PaymentRequest.show() method, part 1. (Closed)

Created:
3 years, 7 months ago by please use gerrit instead
Modified:
3 years, 7 months ago
CC:
blink-reviews, blink-reviews-w3ctests_chromium.org, chromium-reviews, darin-cc_chromium.org, gogerald+paymentswatch_chromium.org, jam, mahmadi+paymentswatch_chromium.org, rouslan+payments_chromium.org, sebsg+paymentswatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Verify behavior of PaymentRequest.show() method, part 1. Before this patch, Chrome on Android would allow only one instance of PaymentRequest per browser process to be displayed, but desktop had no such restriction. This patch adds a check for currently displaying PaymentRequest UI on desktop. The currently displayed instance of PaymentRequest is kept track of in PaymentRequestWebContentsManager. After this patch, Chrome on desktop allows only one instance of PaymentRequest per tab to be displayed. From https://w3c.github.io/browser-payment-api/#show-method "If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException." From https://w3c.github.io/browser-payment-api/#dfn-payment-request-is-showing "The user agent as a whole has a single "payment request is showing" boolean, initially false. This is used to prevent multiple PaymentRequests from being shown, via their show() method, at the same time." BUG=705252 Review-Url: https://codereview.chromium.org/2864013002 Cr-Commit-Position: refs/heads/master@{#469988} Committed: https://chromium.googlesource.com/chromium/src/+/7d433cc2ac0b3e36e6753e84fbfc9253aac646d8

Patch Set 1 #

Patch Set 2 : step-func #

Total comments: 4

Patch Set 3 : Promise test #

Total comments: 6

Patch Set 4 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -4 lines) Patch
M components/payments/content/payment_request.cc View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M components/payments/content/payment_request_web_contents_manager.h View 1 2 3 3 chunks +12 lines, -3 lines 0 comments Download
M components/payments/content/payment_request_web_contents_manager.cc View 1 chunk +15 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html View 1 2 1 chunk +40 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
please use gerrit instead
Marijn, ptal LayoutTests. Mathieu, ptal C++.
3 years, 7 months ago (2017-05-05 17:24:58 UTC) #6
Marijn Kruisselbrink
https://codereview.chromium.org/2864013002/diff/20001/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html File third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html (right): https://codereview.chromium.org/2864013002/diff/20001/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html#newcode4 third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html:4: <title>Test for PaymentRequest Constructor</title> copy/past error? https://codereview.chromium.org/2864013002/diff/20001/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html#newcode35 third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html:35: request2.show().catch(t.step_func(e ...
3 years, 7 months ago (2017-05-05 17:53:20 UTC) #7
please use gerrit instead
Marijn, ptal patch 3. https://codereview.chromium.org/2864013002/diff/20001/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html File third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html (right): https://codereview.chromium.org/2864013002/diff/20001/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html#newcode4 third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html:4: <title>Test for PaymentRequest Constructor</title> On ...
3 years, 7 months ago (2017-05-05 18:16:33 UTC) #9
Marijn Kruisselbrink
lgtm
3 years, 7 months ago (2017-05-05 18:20:05 UTC) #11
Mathieu
lgtm, small stuffs https://codereview.chromium.org/2864013002/diff/40001/components/payments/content/payment_request.cc File components/payments/content/payment_request.cc (right): https://codereview.chromium.org/2864013002/diff/40001/components/payments/content/payment_request.cc#newcode106 components/payments/content/payment_request.cc:106: client_.reset(); I'm curious why not OnConnectionTerminated ...
3 years, 7 months ago (2017-05-08 13:01:42 UTC) #14
please use gerrit instead
Sending to cq. https://codereview.chromium.org/2864013002/diff/40001/components/payments/content/payment_request.cc File components/payments/content/payment_request.cc (right): https://codereview.chromium.org/2864013002/diff/40001/components/payments/content/payment_request.cc#newcode106 components/payments/content/payment_request.cc:106: client_.reset(); On 2017/05/08 13:01:42, Mathieu wrote: ...
3 years, 7 months ago (2017-05-08 13:12:35 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2864013002/60001
3 years, 7 months ago (2017-05-08 13:14:06 UTC) #18
commit-bot: I haz the power
3 years, 7 months ago (2017-05-08 15:18:28 UTC) #21
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/7d433cc2ac0b3e36e6753e84fbfc...

Powered by Google App Engine
This is Rietveld 408576698