diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 15:28:34 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:54:51 +0000 |
commit | 2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch) | |
tree | eb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/components/payments/core/payment_details_modifier_unittest.cc | |
parent | b014812705fc80bff0a5c120dfcef88f349816dc (diff) | |
download | qtwebengine-chromium-2a19c63448c84c1805fb1a585c3651318bb86ca7.tar.gz |
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/payments/core/payment_details_modifier_unittest.cc')
-rw-r--r-- | chromium/components/payments/core/payment_details_modifier_unittest.cc | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/chromium/components/payments/core/payment_details_modifier_unittest.cc b/chromium/components/payments/core/payment_details_modifier_unittest.cc index fd9679c7da0..203cf541cfd 100644 --- a/chromium/components/payments/core/payment_details_modifier_unittest.cc +++ b/chromium/components/payments/core/payment_details_modifier_unittest.cc @@ -15,9 +15,7 @@ namespace payments { TEST(PaymentRequestTest, EmptyPaymentDetailsModifierDictionary) { base::DictionaryValue expected_value; - std::unique_ptr<base::ListValue> supported_methods_list = - std::make_unique<base::ListValue>(); - expected_value.SetList("supportedMethods", std::move(supported_methods_list)); + expected_value.SetString("supportedMethods", ""); expected_value.SetString("data", ""); PaymentDetailsModifier payment_details_modifier; @@ -30,11 +28,7 @@ TEST(PaymentRequestTest, EmptyPaymentDetailsModifierDictionary) { TEST(PaymentRequestTest, PopulatedDetailsModifierDictionary) { base::DictionaryValue expected_value; - std::unique_ptr<base::ListValue> supported_methods_list = - std::make_unique<base::ListValue>(); - supported_methods_list->GetList().emplace_back("basic-card"); - supported_methods_list->GetList().emplace_back("amex"); - expected_value.SetList("supportedMethods", std::move(supported_methods_list)); + expected_value.SetString("supportedMethods", "basic-card"); expected_value.SetString("data", "{\"supportedNetworks\":[\"visa\",\"mastercard\"]}"); std::unique_ptr<base::DictionaryValue> item_dict = @@ -49,9 +43,7 @@ TEST(PaymentRequestTest, PopulatedDetailsModifierDictionary) { expected_value.SetDictionary("total", std::move(item_dict)); PaymentDetailsModifier payment_details_modifier; - payment_details_modifier.method_data.supported_methods.push_back( - "basic-card"); - payment_details_modifier.method_data.supported_methods.push_back("amex"); + payment_details_modifier.method_data.supported_method = "basic-card"; payment_details_modifier.method_data.data = "{\"supportedNetworks\":[\"visa\",\"mastercard\"]}"; payment_details_modifier.total = std::make_unique<PaymentItem>(); @@ -72,16 +64,13 @@ TEST(PaymentRequestTest, PaymentDetailsModifierEquality) { PaymentDetailsModifier details_modifier2; EXPECT_EQ(details_modifier1, details_modifier2); - std::vector<std::string> supported_methods1; - supported_methods1.push_back("China UnionPay"); - supported_methods1.push_back("BobPay"); - details_modifier1.method_data.supported_methods = supported_methods1; + details_modifier1.method_data.supported_method = "BobPay"; EXPECT_NE(details_modifier1, details_modifier2); - std::vector<std::string> supported_methods2; - supported_methods2.push_back("BobPay"); - details_modifier2.method_data.supported_methods = supported_methods2; + + details_modifier2.method_data.supported_method = "China UnionPay"; EXPECT_NE(details_modifier1, details_modifier2); - details_modifier2.method_data.supported_methods = supported_methods1; + + details_modifier2.method_data.supported_method = "BobPay"; EXPECT_EQ(details_modifier1, details_modifier2); details_modifier1.method_data.data = |