onshippingoptionchange should time out |
||
Issue description
event.updateWith(new Promise((resolve) => {})); should timeout for 'onshippingoptionchange'.
,
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
,
Apr 19 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by rouslan@chromium.org
, Apr 17 2017