New issue
Advanced search Search tips

Issue 861704 link

Starred by 3 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 3
Type: Feature
Rollout-Type: Default

Blocked on:
issue 891173

Blocking:
issue 884433



Sign in to add a comment

Implement PaymentResponse.retry()

Project Member Reported by jinho.b...@samsung.com, Jul 9

Issue description

Please provide a link to your UX implementation review here before requesting review.
 
Labels: OS-Android OS-Chrome OS-iOS OS-Linux OS-Mac OS-Windows
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4

commit cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Wed Jul 11 17:37:04 2018

PaymentRequest: Initial implementation of retry()

This change includes the following things:
  - Add a new runtime flag (PaymentRetry)
  - Add new IDL dictionary types
  - Rename PaymentCompleter with PaymentStateResolver

Intent to implement:
  https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/wayZGnuBkrI

Bug: 861704
Change-Id: Ia21260cdd50966cf7a4bb9289b33d004d803e682
Reviewed-on: https://chromium-review.googlesource.com/1128826
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574223}
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/modules_idl_files.gni
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/BUILD.gn
[add] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/address_error_fields.idl
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/complete_test.cc
[add] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payer_error_fields.idl
[delete] https://crrev.com/c0e452422d56ad93dde15fe843dd85dcfe97cb42/third_party/blink/renderer/modules/payments/payment_completer.h
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_request.cc
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_request.h
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_response.cc
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_response.h
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_response.idl
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_response_test.cc
[add] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_state_resolver.h
[add] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/modules/payments/payment_validation_errors.idl
[modify] https://crrev.com/cb91a5b2d88c057e248821d87eb1c0aa6fbd7de4/third_party/blink/renderer/platform/runtime_enabled_features.json5

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 19

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be463a2a4f96597bf3f9e517876f769a962fe063

commit be463a2a4f96597bf3f9e517876f769a962fe063
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Thu Aug 02 10:26:50 2018

PaymentRequest: Implement PaymentResponse.retry() in renderer and mojo

This patch only includs an implementation of PaymentResponse.retry() in
renderer and mojo side. We should implement UI in browser side in follow
up CLs.

Once this patch is applied, most test cases will be passed except when
the UI is required.

Intent to implement:
  https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/wayZGnuBkrI

Test:
  //components/payments/core/payments_validators_unittest.cc
  //third_party/blink/renderer/modules/payments/payments_validators_test.cc
  https://github.com/web-platform-tests/wpt/pull/11101

Bug: 861704
Change-Id: I8a644a32ed589a2292ad021f5699105482ad9dd1
Reviewed-on: https://chromium-review.googlesource.com/1142045
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#580126}
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/content/android/BUILD.gn
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/content/android/java/src/org/chromium/components/payments/PaymentValidator.java
[rename] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/content/android/payment_validator_android.cc
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/content/payment_request.cc
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/content/payment_request.h
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/core/payments_validators.cc
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/core/payments_validators.h
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/core/payments_validators_unittest.cc
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/components/payments/mojom/payment_request_data.mojom
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/public/platform/modules/payments/payment_request.mojom
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/renderer/modules/payments/payment_request.cc
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/renderer/modules/payments/payment_request.h
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/renderer/modules/payments/payment_response.cc
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/renderer/modules/payments/payment_response.h
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/renderer/modules/payments/payments_validators.cc
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/renderer/modules/payments/payments_validators.h
[modify] https://crrev.com/be463a2a4f96597bf3f9e517876f769a962fe063/third_party/blink/renderer/modules/payments/payments_validators_test.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cac8d9a057dc44af44e992d0953221d30aeb3cfc

commit cac8d9a057dc44af44e992d0953221d30aeb3cfc
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Thu Aug 23 19:47:22 2018

PaymentRequest: Implement desktop UI for PaymentResponse.retry()

Related spec change:
  https://github.com/w3c/payment-request/pull/721

Tests:
  chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
  chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc
  components/payments/content/payment_request_spec_unittest.cc
  components/payments/content/payment_request_state_unittest.cc

Manual tests:
  wpt/payment-request/payment-response/retry-method-manual.https.html
  wpt/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html
  wpt/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html

Demo:
  https://youtu.be/_mbcGkbwfw8

Bug: 861704
Change-Id: I12c2d74f7b170626d2c9a41ecfc9116bfe75c2b7
Reviewed-on: https://chromium-review.googlesource.com/1144587
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585581}
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/payments/chrome_payment_request_delegate.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/payments/chrome_payment_request_delegate.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/contact_info_editor_view_controller.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/payment_request_dialog_view.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_dialog.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_display_manager.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_display_manager.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_spec.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_spec.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_spec_unittest.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_state.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_state.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/payment_request_state_unittest.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/service_worker_payment_instrument_unittest.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/test_content_payment_request_delegate.cc
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/content/test_content_payment_request_delegate.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/core/payment_request_delegate.h
[modify] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/payments/core/test_payment_request_delegate.h
[add] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/test/data/payments/payment_request_retry_with_payer_errors.html
[add] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/test/data/payments/payment_request_retry_with_shipping_address_errors.html
[add] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/test/data/payments/retry_helper.js
[add] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/test/data/payments/retry_with_payer_errors.js
[add] https://crrev.com/cac8d9a057dc44af44e992d0953221d30aeb3cfc/components/test/data/payments/retry_with_shipping_address_errors.js

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9127a1291ce6fe83ba374daa5209906e41c2952f

commit 9127a1291ce6fe83ba374daa5209906e41c2952f
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Mon Aug 27 12:14:12 2018

PaymentRequest: Fix a bug in PaymentRequest.retry() browser tests

The following pattern is wrong in browser tests:
  ResetEventWaiter(...);
  RetryPaymentRequest(...);
  WaitForObservedEvent();

The first line in the pattern is unmeaningful because the
RetryPaymentRequest(...) helper method has already ResetEventWaiter()
and WaitForObservedEvent() internally. So, this patch makes the helper
method take DialogEvent and wait for the event internally.

Bug: 861704
Change-Id: I94495cb0f0ed2369a08f49d1065571fa02251a00
Reviewed-on: https://chromium-review.googlesource.com/1189662
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#586240}
[modify] https://crrev.com/9127a1291ce6fe83ba374daa5209906e41c2952f/chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
[modify] https://crrev.com/9127a1291ce6fe83ba374daa5209906e41c2952f/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
[modify] https://crrev.com/9127a1291ce6fe83ba374daa5209906e41c2952f/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
[modify] https://crrev.com/9127a1291ce6fe83ba374daa5209906e41c2952f/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f19d8999c3e76be62cb864d651f4cdccda5eacd

commit 7f19d8999c3e76be62cb864d651f4cdccda5eacd
Author: Jinho Bang <zino@chromium.org>
Date: Mon Aug 27 18:23:00 2018

PaymentRequest: Only peform editors if proper PaymentOption is true

If requestShipping is false, we should not perform the shipping address
editor even if calling retry() with shippingAddressErrors. Similarly,
if none of requestPayer* options is true, we should not perform the
contact info editor even if calling retry() with payerErrors.

Test:
  chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
  chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc
  components/payments/content/payment_request_spec_unittest.cc

Bug: 861704
Change-Id: Id388758617820d9766b0557d0f19670b1044c66e
Reviewed-on: https://chromium-review.googlesource.com/1189245
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#586322}
[modify] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
[modify] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
[modify] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
[modify] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc
[modify] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/components/payments/content/payment_request_spec.cc
[modify] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/components/payments/content/payment_request_spec_unittest.cc
[add] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/components/test/data/payments/payment_request_retry_with_no_payment_options.html
[add] https://crrev.com/7f19d8999c3e76be62cb864d651f4cdccda5eacd/components/test/data/payments/retry_with_no_payment_options.js

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5505148b85cfeb697e7bd241a6de8b89d6533c38

commit 5505148b85cfeb697e7bd241a6de8b89d6533c38
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Wed Sep 05 12:41:23 2018

PaymentRequest: Refactor IsValidPaymentValidationErrorsFormat()

Split the IsValidPaymentValidationErrorsFormat() into smaller pieces.

Bug: 861704
Change-Id: I5fac3d3cb99fb2a106b224d16b821ffca8d9053c
Reviewed-on: https://chromium-review.googlesource.com/1201508
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#588841}
[modify] https://crrev.com/5505148b85cfeb697e7bd241a6de8b89d6533c38/components/payments/core/payments_validators.cc
[modify] https://crrev.com/5505148b85cfeb697e7bd241a6de8b89d6533c38/components/payments/core/payments_validators.h
[modify] https://crrev.com/5505148b85cfeb697e7bd241a6de8b89d6533c38/third_party/blink/renderer/modules/payments/payments_validators.cc
[modify] https://crrev.com/5505148b85cfeb697e7bd241a6de8b89d6533c38/third_party/blink/renderer/modules/payments/payments_validators.h

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/092e716b1783901cc0be8ef2b8307e7a82866c3d

commit 092e716b1783901cc0be8ef2b8307e7a82866c3d
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Thu Sep 06 23:41:19 2018

PaymentRequest: Implement shippingAddressErrors in PaymentDetailsUpdate

This patch allows updateWith() take shippingAddressErrors parameter.

Test: chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc

Bug: 861704
Change-Id: I6c67e0c6c8fbd56d389ab279a1bc7816983a6b65
Reviewed-on: https://chromium-review.googlesource.com/1201625
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#589366}
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/chrome/browser/ui/views/payments/profile_list_view_controller.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/components/payments/content/payment_request.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/components/payments/content/payment_request_spec.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/components/payments/content/payment_request_spec.h
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/components/payments/content/payment_request_spec_unittest.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/components/payments/content/payment_request_state.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/components/payments/content/payment_request_state_unittest.cc
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/components/test/data/payments/dynamic_shipping.js
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/third_party/blink/public/mojom/payments/payment_request.mojom
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/third_party/blink/renderer/modules/payments/payment_details_update.idl
[modify] https://crrev.com/092e716b1783901cc0be8ef2b8307e7a82866c3d/third_party/blink/renderer/modules/payments/payment_request.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bb17815339b85c6a04696e343ea160d4a0864c12

commit bb17815339b85c6a04696e343ea160d4a0864c12
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Thu Sep 13 09:44:43 2018

PaymentRequest: Implement PaymentResponse.payerdetailchange event

The event handler is triggered when the user changes payer information
such as payer name, payer email, or payer phone in the user interface.

Unlike other PaymentRequestUpdateEvent(e.g. shippingaddresschange), this
event can fire only after the website calls retry() with validation
errors in the payer contact information.

This feature is still behind runtime flag(PaymentRetry).

Intent to implement:
  https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/wayZGnuBkrI

Related spec change:
  https://github.com/w3c/payment-request/pull/724

Test:
  payment-request/payment-response/onpayerdetailchange-attribute.https.html
  payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html

Bug: 861704
Change-Id: Ia5d63f53874abd7c76014bf35379a71a0eead622
Reviewed-on: https://chromium-review.googlesource.com/1206750
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#590961}
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentResponseHelper.java
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_request.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_request.h
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_request_state.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_request_state.h
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_request_state_unittest.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_response_helper.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_response_helper.h
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/components/payments/content/payment_response_helper_unittest.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window-expected.txt
[delete] https://crrev.com/62306804ec2c41428e57c89431313c0228746006/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/onpayerdetailchange-attribute.https-expected.txt
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/WebKit/LayoutTests/payments/promises-keep-request-alive.html
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/public/mojom/payments/payment_request.mojom
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/core/events/event_type_names.json5
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/on_payment_response_test.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/payment_request.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/payment_request.h
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/payment_response.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/payment_response.h
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/payment_response.idl
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/payment_response_test.cc
[modify] https://crrev.com/bb17815339b85c6a04696e343ea160d4a0864c12/third_party/blink/renderer/modules/payments/payment_test_helper.cc

Blocking: 884433
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb5d94cee477904632b89d75e095673fa9569872

commit eb5d94cee477904632b89d75e095673fa9569872
Author: Philip Jägenstedt <foolip@chromium.org>
Date: Tue Sep 18 12:03:14 2018

Update not-webview-exposed.txt for PaymentResponse inheritance change

PaymentResponse was recently made to inherit from EventTarget:
https://chromium-review.googlesource.com/c/chromium/src/+/1206750

At the time the webexposed tests were disabled, but now reenbled:
https://chromium-review.googlesource.com/c/chromium/src/+/1223149

That CL update global-interface-listing-expected.txt for the change,
but WebViewLayoutTest also need updating now.

TBR=timvolodine@chromium.org

Bug:  667069 , 861704, 883914
Change-Id: I33ac483d8ee11747405505e3dcf1b7a48fbe1dfa
Reviewed-on: https://chromium-review.googlesource.com/1227128
Commit-Queue: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#592004}
[modify] https://crrev.com/eb5d94cee477904632b89d75e095673fa9569872/android_webview/tools/system_webview_shell/test/data/webexposed/not-webview-exposed.txt

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/941c32aa95d35f838b7b4a360e9a5e61200e9ab7

commit 941c32aa95d35f838b7b4a360e9a5e61200e9ab7
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Mon Oct 01 23:49:16 2018

PaymentRequest: Fix a memory leak in retry()

In the current implementation, memory leaks occur becuase the internal
view_stack_ for payment sheet grows incrementally whenver calling
retry(). So, this patch uses GoBackToPaymentSheet() instead of
ShowInitialPaymentSheet() in RetryDialog(). The method has a logic to
reduce stack's size internally.

Bug: 861704
Change-Id: I2cb94772485165d1fa96463f16f39edf20ccf7bc
Reviewed-on: https://chromium-review.googlesource.com/1255082
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#595644}
[modify] https://crrev.com/941c32aa95d35f838b7b4a360e9a5e61200e9ab7/chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
[modify] https://crrev.com/941c32aa95d35f838b7b4a360e9a5e61200e9ab7/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
[modify] https://crrev.com/941c32aa95d35f838b7b4a360e9a5e61200e9ab7/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
[modify] https://crrev.com/941c32aa95d35f838b7b4a360e9a5e61200e9ab7/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
[modify] https://crrev.com/941c32aa95d35f838b7b4a360e9a5e61200e9ab7/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0685ca950ab71f29d75a5e9ef15b676fb08dee72

commit 0685ca950ab71f29d75a5e9ef15b676fb08dee72
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Tue Oct 02 06:28:54 2018

Revert "PaymentRequest: Fix a memory leak in retry()"

This reverts commit 941c32aa95d35f838b7b4a360e9a5e61200e9ab7.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> PaymentRequest: Fix a memory leak in retry()
> 
> In the current implementation, memory leaks occur becuase the internal
> view_stack_ for payment sheet grows incrementally whenver calling
> retry(). So, this patch uses GoBackToPaymentSheet() instead of
> ShowInitialPaymentSheet() in RetryDialog(). The method has a logic to
> reduce stack's size internally.
> 
> Bug: 861704
> Change-Id: I2cb94772485165d1fa96463f16f39edf20ccf7bc
> Reviewed-on: https://chromium-review.googlesource.com/1255082
> Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
> Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
> Cr-Commit-Position: refs/heads/master@{#595644}

TBR=rouslan@chromium.org,jinho.bang@samsung.com

Change-Id: Ibf67fa672afee9b3da73b6fb22f325641b011186
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 861704
Reviewed-on: https://chromium-review.googlesource.com/1256394
Reviewed-by: Jinho Bang <jinho.bang@samsung.com>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#595741}
[modify] https://crrev.com/0685ca950ab71f29d75a5e9ef15b676fb08dee72/chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
[modify] https://crrev.com/0685ca950ab71f29d75a5e9ef15b676fb08dee72/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
[modify] https://crrev.com/0685ca950ab71f29d75a5e9ef15b676fb08dee72/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
[modify] https://crrev.com/0685ca950ab71f29d75a5e9ef15b676fb08dee72/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
[modify] https://crrev.com/0685ca950ab71f29d75a5e9ef15b676fb08dee72/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc

Blockedon: 891173
Project Member

Comment 16 by bugdroid1@chromium.org, Oct 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c

commit 49fa224f51d2c28e1dacf3b6de16bb0b9503af7c
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Wed Oct 03 15:52:20 2018

Reland "PaymentRequest: Fix a memory leak in retry()"

Reason for revert:
A crash occurs because two animations runs in the same time.
In the current implementation, the ViewStack class seems to be able to
run only one animation per one time. So, before one animation finishes,
if another animation runs, it might cause a crash.

The ShowInitialPaymentSheet() doesn't make animation internally but the
GoBackToPaymentSheet() do. So, after retry() calls, if shipping address
or contact editor runs, it might cause a crash because two animations
runs in the same time.

To resolve this issue, this CL adds a parameter to
GoBackToPaymentSheet() to control whether animation runs or not. If the
`animate` parameter is false, just runs without animation. We don't need
to run animation when retry() calls because the payment sheet is already
hidden and the processing spinner is showing.

Original change's description:
> In the current implementation, memory leaks occur becuase the internal
> view_stack_ for payment sheet grows incrementally whenver calling
> retry(). So, this patch uses GoBackToPaymentSheet() instead of
> ShowInitialPaymentSheet() in RetryDialog(). The method has a logic to
> reduce stack's size internally.
>
> Bug: 861704
> Change-Id: I2cb94772485165d1fa96463f16f39edf20ccf7bc
> Reviewed-on: https://chromium-review.googlesource.com/1255082
> Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
> Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
> Cr-Commit-Position: refs/heads/master@{#595644}

Bug: 861704
Change-Id: I5ab64423697aa11de97bf68ec9d9f262d7676bb5
Reviewed-on: https://chromium-review.googlesource.com/c/1258813
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#596232}
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/payment_request_dialog_view.h
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/view_stack.cc
[modify] https://crrev.com/49fa224f51d2c28e1dacf3b6de16bb0b9503af7c/chrome/browser/ui/views/payments/view_stack.h

Labels: -Type-Launch-OWP Type-Launch
Type-Launch-OWP is deprecated.
Labels: MovedFromTypeLaunchOWP
Labels: Rollout-Type-Default
Bulk Edit: Updating Rollout-Type to Default since no Launch/Target Exp bits are set. 
Please update Rollout-Type to Finch and include Launch/Target Exp bits if not intended be launched as default  

Description: Show this description
Description: Show this description
Description: Show this description
Description: Show this description
Description: Show this description
Description: Show this description
Description: Show this description
Labels: -Type-Launch Type-FLT-Launch FLT-Conversion
Automatic generating of FLT Launch data.
Labels: Restrict-View-Google
Labels: FLT-Conversion-1
Updating this issue's FLT-Conversion label.
Please do not modify this value.

Project Member

Comment 31 by bugdroid1@chromium.org, Nov 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a7262690e2a0f4dbbec697e43a034066320d220

commit 2a7262690e2a0f4dbbec697e43a034066320d220
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Wed Nov 21 14:55:26 2018

PaymentRequest: Fix a retry-method-manual.https.html test

The test is not working because invalid enum value is passed to the
complete() method.

Bug: 861704
Change-Id: I93d54e34a79428fdc88a2c52f12c80ae29c18221
Reviewed-on: https://chromium-review.googlesource.com/c/1346429
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610049}
[modify] https://crrev.com/2a7262690e2a0f4dbbec697e43a034066320d220/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/retry-method-manual.https.html

Labels: Type-Feature
Labels: -Restrict-View-Google
Bulk updating old OWP-Launch bugs to once again be public. OWP-Launch (previously used as public/transparent blink launch process) was not supposed to have been remapped to Type=Launch.
Labels: Type-FLT-Launch
Preparing this issue to be converted back into the old format.

Will change Type back to 'Feature' after.
Labels: FLT-Conversion
Labels: Type-Feature
Labels: Type-FLT-Launch
Labels: Type-Feature

Sign in to add a comment