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

Issue 2048823004: PaymentRequest.abort() should return a promise. (Closed)

Created:
4 years, 6 months ago by please use gerrit instead
Modified:
4 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), dglazkov+blink, haraken, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PaymentRequest.abort() should return a promise. The abort() method on an instance of PaymentRequest returns a promise that is resolved when the browser has hidden its UI. If the browser is unable to abort payment, then the abort() promise is rejected. This can happen, for example, when the browser has launched a 3rd-party payment app and is unable to abort it. PaymentRequest interface: https://w3c.github.io/browser-payment-api/specs/paymentrequest.html#paymentrequest-interface The abort() method: https://w3c.github.io/browser-payment-api/specs/paymentrequest.html#abort The pull request that introduced the promise: https://github.com/w3c/browser-payment-api/pull/190/files Additional changes in this patch: * Move abort() tests into AbortTest.cpp * Move common test fixture into PaymentRequestTestBase.h/cpp. * Actually fail tests if MockFunction is not called as expected. * Fix RejectShowPromiseWithRequestShippingFalseAndShippingAddressInResponse BUG=617193 Committed: https://crrev.com/e411df45423c6c1fd6acb338ce0ea48630784b18 Cr-Commit-Position: refs/heads/master@{#399854}

Patch Set 1 #

Total comments: 15

Patch Set 2 : #

Total comments: 5

Patch Set 3 : DummyPageHolder in V8BindingForTest #

Patch Set 4 : Use sObserverForTest instead of mObserverFotTest #

Patch Set 5 : Include what you use #

Total comments: 4

Patch Set 6 : Moved V8TestingScope refactoring into a different patch #

Total comments: 4

Patch Set 7 : Remove DummyPageHolder and TrackExceptionState for haraken@ comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+474 lines, -193 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/android/chrome_apk.gyp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskBridge.java View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java View 1 2 3 4 chunks +6 lines, -19 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java View 1 2 3 4 5 7 chunks +29 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java View 1 2 3 4 5 5 chunks +10 lines, -20 lines 0 comments Download
M chrome/android/java_sources.gni View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java View 1 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java View 1 7 chunks +18 lines, -4 lines 0 comments Download
A chrome/test/data/android/payments/abort.js View 1 1 chunk +38 lines, -0 lines 0 comments Download
A + chrome/test/data/android/payments/payment_request_abort_test.html View 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/payments/payment-request-interface.html View 1 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/AbortTest.cpp View 1 1 chunk +91 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.h View 1 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.cpp View 1 2 3 4 5 4 chunks +28 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp View 1 2 3 4 5 6 21 chunks +59 lines, -132 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h View 1 2 3 4 5 6 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.cpp View 1 2 3 4 5 6 1 chunk +73 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/payments/payment_request.mojom View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 36 (14 generated)
please use gerrit instead
mek@, ptal WebKit. dfalcantara@, ptal Java. tsepez@, ptal payment_request.mojom.
4 years, 6 months ago (2016-06-08 22:27:44 UTC) #6
Tom Sepez
mojom lgtm
4 years, 6 months ago (2016-06-08 22:29:04 UTC) #7
Marijn Kruisselbrink
https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/MockFunction.h File third_party/WebKit/Source/modules/payments/MockFunction.h (right): https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/MockFunction.h#newcode16 third_party/WebKit/Source/modules/payments/MockFunction.h:16: class MockFunction : public ScriptFunction { I'm a bit ...
4 years, 6 months ago (2016-06-08 22:44:12 UTC) #8
haraken
https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/MockFunction.h File third_party/WebKit/Source/modules/payments/MockFunction.h (right): https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/MockFunction.h#newcode16 third_party/WebKit/Source/modules/payments/MockFunction.h:16: class MockFunction : public ScriptFunction { It would be ...
4 years, 6 months ago (2016-06-09 01:57:59 UTC) #10
gone
https://chromiumcodereview.appspot.com/2048823004/diff/60001/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java (right): https://chromiumcodereview.appspot.com/2048823004/diff/60001/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java#newcode44 chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java:44: clickNode("abort"); This will likely be flaky. Any timing hiccups ...
4 years, 6 months ago (2016-06-09 15:49:28 UTC) #11
please use gerrit instead
haraken@, ptal WebKit. mek@, if you're not out of office, ptal WebKit as well. dfalcantara@, ...
4 years, 6 months ago (2016-06-09 22:36:14 UTC) #15
please use gerrit instead
patch 2.
4 years, 6 months ago (2016-06-09 22:36:30 UTC) #16
haraken
https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h File third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h (right): https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h#newcode19 third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h:19: class PaymentRequestTestBase : public testing::Test { On 2016/06/09 22:36:14, ...
4 years, 6 months ago (2016-06-10 00:15:12 UTC) #17
gone
https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode132 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:132: /** Are you doing this only to avoid having ...
4 years, 6 months ago (2016-06-10 01:25:23 UTC) #18
please use gerrit instead
haraken@, ptal patch 3. dfalcantara@, see my response inline. https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h File third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h (right): https://codereview.chromium.org/2048823004/diff/60001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h#newcode19 third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h:19: ...
4 years, 6 months ago (2016-06-10 21:18:21 UTC) #19
gone
https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode132 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:132: /** On 2016/06/10 21:18:20, Rouslan (ツ) wrote: > On ...
4 years, 6 months ago (2016-06-10 21:24:54 UTC) #20
please use gerrit instead
dfalcantara@, ptal patch 5. https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode132 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:132: /** My bad. The "find-bugs" ...
4 years, 6 months ago (2016-06-10 22:31:59 UTC) #21
gone
Java bits lgtm https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2048823004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode132 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:132: /** On 2016/06/10 22:31:58, Rouslan (ツ) ...
4 years, 6 months ago (2016-06-10 22:37:33 UTC) #22
haraken
Sorry for asking many things in this CL iteratively... The idea is that I'd like ...
4 years, 6 months ago (2016-06-13 01:31:10 UTC) #24
please use gerrit instead
haraken@, ptal patch 6. V8TestingScope changes have been moved to http://crrev.com/2061073003. https://codereview.chromium.org/2048823004/diff/180001/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.h File third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.h (right): ...
4 years, 6 months ago (2016-06-14 05:12:40 UTC) #26
please use gerrit instead
On 2016/06/14 05:12:40, Rouslan (ツ) wrote: > Done. ... in http://crrev.com/2061073003.
4 years, 6 months ago (2016-06-14 05:14:32 UTC) #27
haraken
LGTM https://codereview.chromium.org/2048823004/diff/200001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h File third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h (right): https://codereview.chromium.org/2048823004/diff/200001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h#newcode45 third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h:45: OwnPtr<DummyPageHolder> m_holder; Remove this? https://codereview.chromium.org/2048823004/diff/200001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h#newcode46 third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h:46: TrackExceptionState m_exceptionState; ...
4 years, 6 months ago (2016-06-14 05:24:36 UTC) #28
please use gerrit instead
Sending to cq. https://codereview.chromium.org/2048823004/diff/200001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h File third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h (right): https://codereview.chromium.org/2048823004/diff/200001/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h#newcode45 third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h:45: OwnPtr<DummyPageHolder> m_holder; On 2016/06/14 05:24:35, haraken ...
4 years, 6 months ago (2016-06-15 04:13:19 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2048823004/220001
4 years, 6 months ago (2016-06-15 04:13:52 UTC) #32
commit-bot: I haz the power
Committed patchset #7 (id:220001)
4 years, 6 months ago (2016-06-15 06:49:03 UTC) #33
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-15 06:49:06 UTC) #34
commit-bot: I haz the power
4 years, 6 months ago (2016-06-15 06:53:08 UTC) #36
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e411df45423c6c1fd6acb338ce0ea48630784b18
Cr-Commit-Position: refs/heads/master@{#399854}

Powered by Google App Engine
This is Rietveld 408576698