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

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

Issue 2640293002: PaymentRequest: Move m_abortTimer to frame-specific TaskRunnerTimer. (Closed)
Patch Set: MiscPlatformAPI Created 3 years, 11 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.idl ('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 081121e69356051f37f4c06ddf6c4ac2dea5ee6e..0cf18826f9797774dd7de00bc124f3db263cadb7 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp
@@ -37,8 +37,8 @@ class MockPaymentUpdater : public GarbageCollectedFinalized<MockPaymentUpdater>,
TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsCalled) {
V8TestingScope scope;
- PaymentRequestUpdateEvent* event =
- PaymentRequestUpdateEvent::create(EventTypeNames::shippingaddresschange);
+ PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create(
+ scope.getExecutionContext(), EventTypeNames::shippingaddresschange);
MockPaymentUpdater* updater = new MockPaymentUpdater;
event->setPaymentDetailsUpdater(updater);
event->setEventPhase(Event::kCapturingPhase);
@@ -56,8 +56,8 @@ TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsCalled) {
TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsFailureCalled) {
V8TestingScope scope;
- PaymentRequestUpdateEvent* event =
- PaymentRequestUpdateEvent::create(EventTypeNames::shippingaddresschange);
+ PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create(
+ scope.getExecutionContext(), EventTypeNames::shippingaddresschange);
MockPaymentUpdater* updater = new MockPaymentUpdater;
event->setPaymentDetailsUpdater(updater);
event->setEventPhase(Event::kCapturingPhase);
@@ -75,8 +75,8 @@ TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsFailureCalled) {
TEST(PaymentRequestUpdateEventTest, CannotUpdateWithoutDispatching) {
V8TestingScope scope;
- PaymentRequestUpdateEvent* event =
- PaymentRequestUpdateEvent::create(EventTypeNames::shippingaddresschange);
+ PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create(
+ scope.getExecutionContext(), EventTypeNames::shippingaddresschange);
event->setPaymentDetailsUpdater(new MockPaymentUpdater);
event->updateWith(
@@ -89,8 +89,8 @@ TEST(PaymentRequestUpdateEventTest, CannotUpdateWithoutDispatching) {
TEST(PaymentRequestUpdateEventTest, CannotUpdateTwice) {
V8TestingScope scope;
- PaymentRequestUpdateEvent* event =
- PaymentRequestUpdateEvent::create(EventTypeNames::shippingaddresschange);
+ PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create(
+ scope.getExecutionContext(), EventTypeNames::shippingaddresschange);
MockPaymentUpdater* updater = new MockPaymentUpdater;
event->setPaymentDetailsUpdater(updater);
event->setEventPhase(Event::kCapturingPhase);
@@ -110,8 +110,8 @@ TEST(PaymentRequestUpdateEventTest, CannotUpdateTwice) {
TEST(PaymentRequestUpdateEventTest, UpdaterNotRequired) {
V8TestingScope scope;
- PaymentRequestUpdateEvent* event =
- PaymentRequestUpdateEvent::create(EventTypeNames::shippingaddresschange);
+ PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create(
+ scope.getExecutionContext(), EventTypeNames::shippingaddresschange);
event->updateWith(
scope.getScriptState(),
@@ -128,8 +128,8 @@ TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsTimeout) {
PaymentRequest* request = PaymentRequest::create(
scope.document(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), scope.getExceptionState());
- PaymentRequestUpdateEvent* event =
- PaymentRequestUpdateEvent::create(EventTypeNames::shippingaddresschange);
+ PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create(
+ scope.getExecutionContext(), EventTypeNames::shippingaddresschange);
event->setPaymentDetailsUpdater(request);
EXPECT_FALSE(scope.getExceptionState().hadException());
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698