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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 ResetEventObserver(DialogEvent::DIALOG_CLOSED); | 95 ResetEventObserver(DialogEvent::DIALOG_CLOSED); |
96 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); | 96 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); |
97 | 97 |
98 // Test that the shipping address was sent to the merchant. | 98 // Test that the shipping address was sent to the merchant. |
99 ExpectBodyContains({"\"country\": \"US\"", "\"123 Main Street\"", | 99 ExpectBodyContains({"\"country\": \"US\"", "\"123 Main Street\"", |
100 "\"Unit 1\"", "\"region\": \"MI\"", | 100 "\"Unit 1\"", "\"region\": \"MI\"", |
101 "\"city\": \"Greensdale\"", "\"dependentLocality\": \"\"", | 101 "\"city\": \"Greensdale\"", "\"dependentLocality\": \"\"", |
102 "\"postalCode\": \"48838\"", "\"sortingCode\": \"\"", | 102 "\"postalCode\": \"48838\"", "\"sortingCode\": \"\"", |
103 "\"languageCode\": \"\"", "\"organization\": \"ACME\"", | 103 "\"languageCode\": \"\"", "\"organization\": \"ACME\"", |
104 "\"recipient\": \"Jane A. Smith\"", | 104 "\"recipient\": \"Jane A. Smith\"", |
105 "\"phone\": \"13105557889\""}); | 105 "\"phone\": \"+13105557889\""}); |
106 | 106 |
107 // Test that the shipping option was sent to the merchant. | 107 // Test that the shipping option was sent to the merchant. |
108 ExpectBodyContains({"\"shippingOption\": \"freeShippingOption\""}); | 108 ExpectBodyContains({"\"shippingOption\": \"freeShippingOption\""}); |
109 } | 109 } |
110 | 110 |
111 class PaymentRequestPaymentResponseAllContactDetailsTest | 111 class PaymentRequestPaymentResponseAllContactDetailsTest |
112 : public PaymentRequestBrowserTestBase { | 112 : public PaymentRequestBrowserTestBase { |
113 protected: | 113 protected: |
114 PaymentRequestPaymentResponseAllContactDetailsTest() | 114 PaymentRequestPaymentResponseAllContactDetailsTest() |
115 : PaymentRequestBrowserTestBase( | 115 : PaymentRequestBrowserTestBase( |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 ResetEventObserver(DialogEvent::DIALOG_CLOSED); | 168 ResetEventObserver(DialogEvent::DIALOG_CLOSED); |
169 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); | 169 PayWithCreditCardAndWait(base::ASCIIToUTF16("123")); |
170 | 170 |
171 // Test that the contact details were sent to the merchant. | 171 // Test that the contact details were sent to the merchant. |
172 ExpectBodyContains({"\"payerName\": null", | 172 ExpectBodyContains({"\"payerName\": null", |
173 "\"payerEmail\": \"johndoe@hades.com\"", | 173 "\"payerEmail\": \"johndoe@hades.com\"", |
174 "\"payerPhone\": null"}); | 174 "\"payerPhone\": null"}); |
175 } | 175 } |
176 | 176 |
177 } // namespace payments | 177 } // namespace payments |
OLD | NEW |