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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp

Issue 2170783002: Add a timeout to the update event in case page doesn't resolve promise from updateWith (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed the DCHECK Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp
index ce0d4a7f888e9e75a05883b91e23d1eb2eadf2ff..3e72fe9d2d4fd4dd10b65bee278ada227f9e9647 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp
@@ -101,5 +101,18 @@ TEST(PaymentRequestUpdateEventTest, UpdaterNotRequired)
EXPECT_FALSE(scope.getExceptionState().hadException());
}
+TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsTimeout)
+{
+ V8TestingScope scope;
+ PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create();
+ MockPaymentUpdater* updater = new MockPaymentUpdater;
+ event->setPaymentDetailsUpdater(updater);
+
+ EXPECT_CALL(*updater, onUpdatePaymentDetails(testing::_)).Times(0);
+ EXPECT_CALL(*updater, onUpdatePaymentDetailsFailure(testing::_));
+
+ event->onTimerFired(0);
+}
+
} // namespace
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698