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 3ca10494231e058565fe64100fbc597b81032f42..617fa7d3a5a512a3cf5bc1a5c39e652a19a32b94 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp |
@@ -329,9 +329,13 @@ TEST(PaymentRequestTest, RejectShowPromiseOnUpdateDetailsFailure) |
PaymentRequest* request = PaymentRequest::create(scope.getScriptState(), buildPaymentMethodDataForTest(), buildPaymentDetailsForTest(), scope.getExceptionState()); |
EXPECT_FALSE(scope.getExceptionState().hadException()); |
- request->show(scope.getScriptState()).then(funcs.expectNoCall(), funcs.expectCall()); |
+ String errorMessage; |
+ request->show(scope.getScriptState()).then(funcs.expectNoCall(), funcs.expectCall(&errorMessage)); |
request->onUpdatePaymentDetailsFailure(ScriptValue::from(scope.getScriptState(), "oops")); |
+ |
+ v8::MicrotasksScope::PerformCheckpoint(scope.getScriptState()->isolate()); |
+ EXPECT_EQ("AbortError: oops", errorMessage); |
} |
TEST(PaymentRequestTest, RejectCompletePromiseOnUpdateDetailsFailure) |
@@ -344,9 +348,13 @@ TEST(PaymentRequestTest, RejectCompletePromiseOnUpdateDetailsFailure) |
request->show(scope.getScriptState()).then(funcs.expectCall(), funcs.expectNoCall()); |
static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(buildPaymentResponseForTest()); |
- request->complete(scope.getScriptState(), Success).then(funcs.expectNoCall(), funcs.expectCall()); |
+ String errorMessage; |
+ request->complete(scope.getScriptState(), Success).then(funcs.expectNoCall(), funcs.expectCall(&errorMessage)); |
request->onUpdatePaymentDetailsFailure(ScriptValue::from(scope.getScriptState(), "oops")); |
+ |
+ v8::MicrotasksScope::PerformCheckpoint(scope.getScriptState()->isolate()); |
+ EXPECT_EQ("AbortError: oops", errorMessage); |
} |
TEST(PaymentRequestTest, IgnoreUpdatePaymentDetailsAfterShowPromiseResolved) |