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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentResponseTest.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
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentResponse.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b8fea8636606f189fc1a5edc35ab8e50949ddc97..e3984bc1966f9f9dbd6ad34d5c29c47ae1e51588 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
@@ -55,7 +55,7 @@ TEST(PaymentResponseTest, DataCopiedOver) {
MockPaymentCompleter* complete_callback = new MockPaymentCompleter;
PaymentResponse* output =
- new PaymentResponse(std::move(input), complete_callback);
+ new PaymentResponse(std::move(input), complete_callback, "");
EXPECT_EQ("foo", output->methodName());
EXPECT_EQ("standardShippingOption", output->shippingOption());
@@ -85,7 +85,7 @@ TEST(PaymentResponseTest, PaymentResponseDetailsJSONObject) {
input->stringified_details = "transactionId";
MockPaymentCompleter* complete_callback = new MockPaymentCompleter;
PaymentResponse* output =
- new PaymentResponse(std::move(input), complete_callback);
+ new PaymentResponse(std::move(input), complete_callback, "");
ScriptValue details =
output->details(scope.GetScriptState(), scope.GetExceptionState());
@@ -101,7 +101,7 @@ TEST(PaymentResponseTest, CompleteCalledWithSuccess) {
input->stringified_details = "{\"transactionId\": 123}";
MockPaymentCompleter* complete_callback = new MockPaymentCompleter;
PaymentResponse* output =
- new PaymentResponse(std::move(input), complete_callback);
+ new PaymentResponse(std::move(input), complete_callback, "");
EXPECT_CALL(*complete_callback,
Complete(scope.GetScriptState(), PaymentCompleter::kSuccess));
@@ -117,7 +117,7 @@ TEST(PaymentResponseTest, CompleteCalledWithFailure) {
input->stringified_details = "{\"transactionId\": 123}";
MockPaymentCompleter* complete_callback = new MockPaymentCompleter;
PaymentResponse* output =
- new PaymentResponse(std::move(input), complete_callback);
+ new PaymentResponse(std::move(input), complete_callback, "");
EXPECT_CALL(*complete_callback,
Complete(scope.GetScriptState(), PaymentCompleter::kFail));
@@ -144,7 +144,7 @@ TEST(PaymentResponseTest, JSONSerializerTest) {
input->shipping_address->address_line.push_back("First floor");
PaymentResponse* output =
- new PaymentResponse(std::move(input), new MockPaymentCompleter);
+ new PaymentResponse(std::move(input), new MockPaymentCompleter, "");
ScriptValue json_object = output->toJSONForBinding(scope.GetScriptState());
EXPECT_TRUE(json_object.IsObject());
@@ -154,7 +154,8 @@ TEST(PaymentResponseTest, JSONSerializerTest) {
.ToLocalChecked(),
kDoNotExternalize);
String expected =
- "{\"methodName\":\"foo\",\"details\":{\"transactionId\":123},"
+ "{\"requestId\":\"\",\"methodName\":\"foo\",\"details\":{"
+ "\"transactionId\":123},"
"\"shippingAddress\":{\"country\":\"US\",\"addressLine\":[\"340 Main "
"St\","
"\"BIN1\",\"First "
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentResponse.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698