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

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

Issue 2770193003: Implement request id in PaymentDetailsInit (Closed)
Patch Set: Rebase once more since mojom file moved Created 3 years, 8 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 b52a250a60f8acc548eb622cb5338667a745b4cd..c7d0851ad2da4369d9de7492a400e04504d3f984 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
@@ -631,5 +631,19 @@ TEST(PaymentRequestTest,
EXPECT_TRUE(request->shippingOption().IsNull());
}
+TEST(PaymentRequestTest, DetailsIdIsSet) {
+ V8TestingScope scope;
+ MakePaymentRequestOriginSecure(scope.GetDocument());
+ 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