Index: third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp |
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp |
index 35da551475c3540bd99e0d0fd453386bf6539029..a683458a27bf5385b82e161d780763bacddc7eaf 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp |
@@ -69,6 +69,19 @@ TEST(PaymentResponseTest, DataCopiedOver) |
EXPECT_EQ(123, transactionId.v8Value().As<v8::Number>()->Value()); |
} |
+TEST(PaymentResponseTest, PaymentResponseDetailsJSONObject) |
+{ |
+ V8TestingScope scope; |
+ mojom::blink::PaymentResponsePtr input = buildPaymentResponseForTest(); |
+ input->stringified_details = "transactionId"; |
+ MockPaymentCompleter* completeCallback = new MockPaymentCompleter; |
+ PaymentResponse output(std::move(input), completeCallback); |
+ |
+ ScriptValue details = output.details(scope.getScriptState(), scope.getExceptionState()); |
+ |
+ ASSERT_TRUE(scope.getExceptionState().hadException()); |
+} |
+ |
TEST(PaymentResponseTest, CompleteCalledWithSuccess) |
{ |
V8TestingScope scope; |