New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 711691 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

onshippingoptionchange should time out

Project Member Reported by rouslan@chromium.org, Apr 14 2017

Issue description

event.updateWith(new Promise((resolve) => {})); should timeout for 'onshippingoptionchange'.
 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 19 2017

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

commit 34f37c9993ce9bff9a5561d03d6b9fa29fa48bff
Author: rouslan <rouslan@chromium.org>
Date: Wed Apr 19 19:14:22 2017

Web payment shipping address/option timeout.

Before this patch, calling e.updateWith(new Promise((resolve) => {}));
would result in 'shippingoptionchange' and 'shippingaddresschange' never
timing out. This is because the timeout timer was being stopped in
updateWith() call.

The fix is to stop the timeout timer when the resolve() callback is
invoked instead of when updateWith() is called.

After this patch, calling e.updateWith(new Promise((resolve) => {}));
will timeout after 60 seconds.

To test manually:
1) Open https://rsolomakhin.github.io/pr/ko/promise/.
2) Click [Buy].
3) Change the shipping address or option.
Observe: The UI closes and the page shows an error message after 60
         seconds.

The error message has been made more verbose as well: "Timed out waiting
for a response to a 'shippingaddresschange' event".

BUG= 711691 
TEST=PaymentRequestUpdateEventTest

Review-Url: https://codereview.chromium.org/2823393002
Cr-Commit-Position: refs/heads/master@{#465698}

[modify] https://crrev.com/34f37c9993ce9bff9a5561d03d6b9fa29fa48bff/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp
[modify] https://crrev.com/34f37c9993ce9bff9a5561d03d6b9fa29fa48bff/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.h
[modify] https://crrev.com/34f37c9993ce9bff9a5561d03d6b9fa29fa48bff/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp

Status: Fixed (was: Started)

Sign in to add a comment