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

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

Issue 2054823002: PaymentRequest: complete() method should take PaymentComplete enum value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/PaymentRequestTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
index 7984615d03bc4fc9c0e541f5250d07e323a8419d..be38125b59bde348f7d79b380b947f0c6a18376b 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
@@ -361,9 +361,9 @@ TEST(PaymentRequestTest, CannotCallCompleteTwice)
EXPECT_FALSE(scope.getExceptionState().hadException());
request->show(scope.getScriptState());
static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(buildPaymentResponseForTest());
- request->complete(scope.getScriptState(), false);
+ request->complete(scope.getScriptState(), Fail);
- request->complete(scope.getScriptState(), true).then(funcs.expectNoCall(), funcs.expectCall());
+ request->complete(scope.getScriptState(), Success).then(funcs.expectNoCall(), funcs.expectCall());
}
TEST(PaymentRequestTest, RejectShowPromiseOnError)
@@ -389,7 +389,7 @@ TEST(PaymentRequestTest, RejectCompletePromiseOnError)
request->show(scope.getScriptState());
static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(buildPaymentResponseForTest());
- request->complete(scope.getScriptState(), true).then(funcs.expectNoCall(), funcs.expectCall());
+ request->complete(scope.getScriptState(), Success).then(funcs.expectNoCall(), funcs.expectCall());
static_cast<mojom::blink::PaymentRequestClient*>(request)->OnError();
}
@@ -404,7 +404,7 @@ TEST(PaymentRequestTest, ResolvePromiseOnComplete)
request->show(scope.getScriptState());
static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(buildPaymentResponseForTest());
- request->complete(scope.getScriptState(), true).then(funcs.expectCall(), funcs.expectNoCall());
+ request->complete(scope.getScriptState(), Success).then(funcs.expectCall(), funcs.expectNoCall());
static_cast<mojom::blink::PaymentRequestClient*>(request)->OnComplete();
}
@@ -432,7 +432,7 @@ TEST(PaymentRequestTest, RejectCompletePromiseOnUpdateDetailsFailure)
request->show(scope.getScriptState()).then(funcs.expectCall(), funcs.expectNoCall());
static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(buildPaymentResponseForTest());
- request->complete(scope.getScriptState(), true).then(funcs.expectNoCall(), funcs.expectCall());
+ request->complete(scope.getScriptState(), Success).then(funcs.expectNoCall(), funcs.expectCall());
request->onUpdatePaymentDetailsFailure(ScriptValue::from(scope.getScriptState(), "oops"));
}

Powered by Google App Engine
This is Rietveld 408576698