[Desktop Payment Request] Show spinner while querying payment methods.
Before this patch, the Payment Request dialog on desktop would not be shown after the merchant called PaymentRequest.show(). The dialog would be shown only after the payment handlers have been queried. This patch makes the Payment Request dialog UI appear with a "Processing" spinner when PaymentRequest.show() is called. When the payment handler query has finished, the dialog hides the processing spinner and becomes interactive. A few minor improvements flow from this change: - There's no longer a need for a hidden dialog that is eventually shown. The dialog is always shown after PaymentRequest.show(). - The tests are updated to expect the processing spinner before the "dialog opened" event. - To better debug incorrect expectations in tests, the variable |events_| is renamed into |expected_events_| and the variable |event| is renamed into |actual_event| in test_event_waiter.h. - Because the JourneyLogger is owned privately in PaymentRequest object and the "event shown" needs to be recorded before the "dialog opened" testing event is fired from the UI, the PaymentRequest object now exposes the RecordDialogShownEventInJourneyLogger() method to be called from the UI layer. After this patch, the Payment Request dialog on desktop is shown in a spinning state with "Processing" message after the merchant calls PaymentRequest.show(), before the payment handlers have been queried. Bug: 783811 Change-Id: I820c9e8a093f74b30e5e7f29ef39675f60c17158 Reviewed-on: https://chromium-review.googlesource.com/1159183Reviewed-by:Sebastien Seguin-Gagnon <sebsg@chromium.org> Reviewed-by:
anthonyvd <anthonyvd@chromium.org> Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#581731}
Showing
Please register or sign in to comment