| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 // Complete the Payment Request. | 146 // Complete the Payment Request. |
| 147 InvokePaymentRequestUI(); | 147 InvokePaymentRequestUI(); |
| 148 ResetEventObserver(DialogEvent::DIALOG_CLOSED); | 148 ResetEventObserver(DialogEvent::DIALOG_CLOSED); |
| 149 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); | 149 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); |
| 150 | 150 |
| 151 // Test that the contact details were sent to the merchant. | 151 // Test that the contact details were sent to the merchant. |
| 152 ExpectBodyContains(std::vector<base::string16>{ | 152 ExpectBodyContains(std::vector<base::string16>{ |
| 153 base::UTF8ToUTF16("\"payerName\": \"John H. Doe\""), | 153 base::UTF8ToUTF16("\"payerName\": \"John H. Doe\""), |
| 154 base::UTF8ToUTF16("\"payerEmail\": \"johndoe@hades.com\""), | 154 base::UTF8ToUTF16("\"payerEmail\": \"johndoe@hades.com\""), |
| 155 base::UTF8ToUTF16("\"payerPhone\": \"16502111111\"")}); | 155 base::UTF8ToUTF16("\"payerPhone\": \"+16502111111\"")}); |
| 156 } | 156 } |
| 157 | 157 |
| 158 class PaymentRequestPaymentResponseOneContactDetailTest | 158 class PaymentRequestPaymentResponseOneContactDetailTest |
| 159 : public PaymentRequestBrowserTestBase { | 159 : public PaymentRequestBrowserTestBase { |
| 160 protected: | 160 protected: |
| 161 PaymentRequestPaymentResponseOneContactDetailTest() | 161 PaymentRequestPaymentResponseOneContactDetailTest() |
| 162 : PaymentRequestBrowserTestBase( | 162 : PaymentRequestBrowserTestBase( |
| 163 "/payment_request_email_and_free_shipping_test.html") {} | 163 "/payment_request_email_and_free_shipping_test.html") {} |
| 164 | 164 |
| 165 private: | 165 private: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 183 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); | 183 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); |
| 184 | 184 |
| 185 // Test that the contact details were sent to the merchant. | 185 // Test that the contact details were sent to the merchant. |
| 186 ExpectBodyContains(std::vector<base::string16>{ | 186 ExpectBodyContains(std::vector<base::string16>{ |
| 187 base::UTF8ToUTF16("\"payerName\": null"), | 187 base::UTF8ToUTF16("\"payerName\": null"), |
| 188 base::UTF8ToUTF16("\"payerEmail\": \"johndoe@hades.com\""), | 188 base::UTF8ToUTF16("\"payerEmail\": \"johndoe@hades.com\""), |
| 189 base::UTF8ToUTF16("\"payerPhone\": null")}); | 189 base::UTF8ToUTF16("\"payerPhone\": null")}); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace payments | 192 } // namespace payments |
| OLD | NEW |