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 0cf18826f9797774dd7de00bc124f3db263cadb7..91bed675c08b16e28652c6bd2554f383989107f5 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp |
@@ -4,6 +4,7 @@ |
#include "modules/payments/PaymentRequestUpdateEvent.h" |
+#include <memory> |
#include "bindings/core/v8/ExceptionState.h" |
#include "bindings/core/v8/ScriptPromiseResolver.h" |
#include "bindings/core/v8/ScriptState.h" |
@@ -14,7 +15,6 @@ |
#include "modules/payments/PaymentUpdater.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
-#include <memory> |
namespace blink { |
namespace { |
@@ -38,7 +38,7 @@ class MockPaymentUpdater : public GarbageCollectedFinalized<MockPaymentUpdater>, |
TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsCalled) { |
V8TestingScope scope; |
PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create( |
- scope.getExecutionContext(), EventTypeNames::shippingaddresschange); |
+ scope.getScriptState(), EventTypeNames::shippingaddresschange); |
MockPaymentUpdater* updater = new MockPaymentUpdater; |
event->setPaymentDetailsUpdater(updater); |
event->setEventPhase(Event::kCapturingPhase); |
@@ -57,7 +57,7 @@ TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsCalled) { |
TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsFailureCalled) { |
V8TestingScope scope; |
PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create( |
- scope.getExecutionContext(), EventTypeNames::shippingaddresschange); |
+ scope.getScriptState(), EventTypeNames::shippingaddresschange); |
MockPaymentUpdater* updater = new MockPaymentUpdater; |
event->setPaymentDetailsUpdater(updater); |
event->setEventPhase(Event::kCapturingPhase); |
@@ -76,7 +76,7 @@ TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsFailureCalled) { |
TEST(PaymentRequestUpdateEventTest, CannotUpdateWithoutDispatching) { |
V8TestingScope scope; |
PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create( |
- scope.getExecutionContext(), EventTypeNames::shippingaddresschange); |
+ scope.getScriptState(), EventTypeNames::shippingaddresschange); |
event->setPaymentDetailsUpdater(new MockPaymentUpdater); |
event->updateWith( |
@@ -90,7 +90,7 @@ TEST(PaymentRequestUpdateEventTest, CannotUpdateWithoutDispatching) { |
TEST(PaymentRequestUpdateEventTest, CannotUpdateTwice) { |
V8TestingScope scope; |
PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create( |
- scope.getExecutionContext(), EventTypeNames::shippingaddresschange); |
+ scope.getScriptState(), EventTypeNames::shippingaddresschange); |
MockPaymentUpdater* updater = new MockPaymentUpdater; |
event->setPaymentDetailsUpdater(updater); |
event->setEventPhase(Event::kCapturingPhase); |
@@ -111,7 +111,7 @@ TEST(PaymentRequestUpdateEventTest, CannotUpdateTwice) { |
TEST(PaymentRequestUpdateEventTest, UpdaterNotRequired) { |
V8TestingScope scope; |
PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create( |
- scope.getExecutionContext(), EventTypeNames::shippingaddresschange); |
+ scope.getScriptState(), EventTypeNames::shippingaddresschange); |
event->updateWith( |
scope.getScriptState(), |
@@ -126,10 +126,10 @@ TEST(PaymentRequestUpdateEventTest, OnUpdatePaymentDetailsTimeout) { |
PaymentRequestMockFunctionScope funcs(scope.getScriptState()); |
makePaymentRequestOriginSecure(scope.document()); |
PaymentRequest* request = PaymentRequest::create( |
- scope.document(), buildPaymentMethodDataForTest(), |
+ scope.getScriptState(), buildPaymentMethodDataForTest(), |
buildPaymentDetailsForTest(), scope.getExceptionState()); |
PaymentRequestUpdateEvent* event = PaymentRequestUpdateEvent::create( |
- scope.getExecutionContext(), EventTypeNames::shippingaddresschange); |
+ scope.getScriptState(), EventTypeNames::shippingaddresschange); |
event->setPaymentDetailsUpdater(request); |
EXPECT_FALSE(scope.getExceptionState().hadException()); |