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

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

Issue 2770193003: Implement request id in PaymentDetailsInit (Closed)
Patch Set: Add comment in mojom Created 3 years, 9 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 9dac1460f6c7252d3ba7144c2d52877cb170bf7d..02e7d979ea645963cbb775e7ae526865915a7907 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
@@ -632,5 +632,19 @@ TEST(PaymentRequestTest,
EXPECT_TRUE(request->shippingOption().isNull());
}
+TEST(PaymentRequestTest, DetailsIdIsSet) {
+ V8TestingScope scope;
+ makePaymentRequestOriginSecure(scope.document());
+ PaymentDetailsInit details;
+ details.setTotal(buildPaymentItemForTest());
+ details.setId("my_payment_id");
+
+ PaymentRequest* request = PaymentRequest::create(
+ scope.getExecutionContext(), buildPaymentMethodDataForTest(), details,
+ scope.getExceptionState());
+
+ EXPECT_EQ("my_payment_id", request->id());
+}
+
} // namespace
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698