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

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

Issue 2697123003: Use ExecutionContext instead of Document in PaymentRequest constructor. (Closed)
Patch Set: ExecutionContext in constructor only Created 3 years, 10 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
Index: third_party/WebKit/Source/modules/payments/CompleteTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/CompleteTest.cpp b/third_party/WebKit/Source/modules/payments/CompleteTest.cpp
index 49b598bef69f3b7cc54a38acf4adfde18667cc98..c6c805bec7946d77501eb5385334c78c0a485615 100644
--- a/third_party/WebKit/Source/modules/payments/CompleteTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/CompleteTest.cpp
@@ -17,7 +17,7 @@ TEST(CompleteTest, CannotCallCompleteTwice) {
PaymentRequestMockFunctionScope funcs(scope.getScriptState());
makePaymentRequestOriginSecure(scope.document());
PaymentRequest* request = PaymentRequest::create(
- scope.document(), buildPaymentMethodDataForTest(),
+ scope.getExecutionContext(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
request->show(scope.getScriptState());
@@ -34,7 +34,7 @@ TEST(CompleteTest, RejectCompletePromiseOnError) {
PaymentRequestMockFunctionScope funcs(scope.getScriptState());
makePaymentRequestOriginSecure(scope.document());
PaymentRequest* request = PaymentRequest::create(
- scope.document(), buildPaymentMethodDataForTest(),
+ scope.getExecutionContext(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
request->show(scope.getScriptState());
@@ -59,7 +59,7 @@ TEST(CompleteTest, RejectCompletePromiseAfterError) {
PaymentRequestMockFunctionScope funcs(scope.getScriptState());
makePaymentRequestOriginSecure(scope.document());
PaymentRequest* request = PaymentRequest::create(
- scope.document(), buildPaymentMethodDataForTest(),
+ scope.getExecutionContext(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
request->show(scope.getScriptState());
@@ -77,7 +77,7 @@ TEST(CompleteTest, ResolvePromiseOnComplete) {
PaymentRequestMockFunctionScope funcs(scope.getScriptState());
makePaymentRequestOriginSecure(scope.document());
PaymentRequest* request = PaymentRequest::create(
- scope.document(), buildPaymentMethodDataForTest(),
+ scope.getExecutionContext(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
request->show(scope.getScriptState());
@@ -96,7 +96,7 @@ TEST(CompleteTest, RejectCompletePromiseOnUpdateDetailsFailure) {
PaymentRequestMockFunctionScope funcs(scope.getScriptState());
makePaymentRequestOriginSecure(scope.document());
PaymentRequest* request = PaymentRequest::create(
- scope.document(), buildPaymentMethodDataForTest(),
+ scope.getExecutionContext(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
request->show(scope.getScriptState())
@@ -119,7 +119,7 @@ TEST(CompleteTest, RejectCompletePromiseAfterTimeout) {
PaymentRequestMockFunctionScope funcs(scope.getScriptState());
makePaymentRequestOriginSecure(scope.document());
PaymentRequest* request = PaymentRequest::create(
- scope.document(), buildPaymentMethodDataForTest(),
+ scope.getExecutionContext(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
request->show(scope.getScriptState())

Powered by Google App Engine
This is Rietveld 408576698