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

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_payment_response_browsertest.cc

Issue 2842463002: [Payments] Normalize billing address for response on Desktop. (Closed)
Patch Set: Keep the old version for iOS 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" 10 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Test that the card details were sent to the merchant. 50 // Test that the card details were sent to the merchant.
51 ExpectBodyContains({"\"cardNumber\": \"4111111111111111\"", 51 ExpectBodyContains({"\"cardNumber\": \"4111111111111111\"",
52 "\"cardSecurityCode\": \"123\"", 52 "\"cardSecurityCode\": \"123\"",
53 "\"cardholderName\": \"Test User\"", 53 "\"cardholderName\": \"Test User\"",
54 "\"expiryMonth\": \"11\"", "\"expiryYear\": \"2022\""}); 54 "\"expiryMonth\": \"11\"", "\"expiryYear\": \"2022\""});
55 55
56 // Test that the billing address was sent to the merchant. 56 // Test that the billing address was sent to the merchant.
57 ExpectBodyContains({"\"billingAddress\": {", "\"666 Erebus St.\"", 57 ExpectBodyContains({"\"billingAddress\": {", "\"666 Erebus St.\"",
58 "\"Apt 8\"", "\"city\": \"Elysium\"", 58 "\"Apt 8\"", "\"city\": \"Elysium\"",
59 "\"country\": \"US\"", "\"organization\": \"Underworld\"", 59 "\"country\": \"US\"", "\"organization\": \"Underworld\"",
60 "\"phone\": \"16502111111\"", "\"postalCode\": \"91111\"", 60 "\"phone\": \"+16502111111\"",
61 "\"postalCode\": \"91111\"",
61 "\"recipient\": \"John H. Doe\"", "\"region\": \"CA\""}); 62 "\"recipient\": \"John H. Doe\"", "\"region\": \"CA\""});
62 } 63 }
63 64
64 class PaymentRequestPaymentResponseShippingAddressTest 65 class PaymentRequestPaymentResponseShippingAddressTest
65 : public PaymentRequestBrowserTestBase { 66 : public PaymentRequestBrowserTestBase {
66 protected: 67 protected:
67 PaymentRequestPaymentResponseShippingAddressTest() 68 PaymentRequestPaymentResponseShippingAddressTest()
68 : PaymentRequestBrowserTestBase( 69 : PaymentRequestBrowserTestBase(
69 "/payment_request_free_shipping_test.html") {} 70 "/payment_request_free_shipping_test.html") {}
70 71
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ResetEventObserver(DialogEvent::DIALOG_CLOSED); 169 ResetEventObserver(DialogEvent::DIALOG_CLOSED);
169 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); 170 PayWithCreditCardAndWait(base::ASCIIToUTF16("123"));
170 171
171 // Test that the contact details were sent to the merchant. 172 // Test that the contact details were sent to the merchant.
172 ExpectBodyContains({"\"payerName\": null", 173 ExpectBodyContains({"\"payerName\": null",
173 "\"payerEmail\": \"johndoe@hades.com\"", 174 "\"payerEmail\": \"johndoe@hades.com\"",
174 "\"payerPhone\": null"}); 175 "\"payerPhone\": null"});
175 } 176 }
176 177
177 } // namespace payments 178 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698