OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |