| 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 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Returns the text of the StyledLabel with the specific |view_id| that is a | 173 // Returns the text of the StyledLabel with the specific |view_id| that is a |
| 174 // child of the Payment Request dialog view. | 174 // child of the Payment Request dialog view. |
| 175 const base::string16& GetStyledLabelText(DialogViewID view_id); | 175 const base::string16& GetStyledLabelText(DialogViewID view_id); |
| 176 // Returns the error label text associated with a given field |type|. | 176 // Returns the error label text associated with a given field |type|. |
| 177 const base::string16& GetErrorLabelForType(autofill::ServerFieldType type); | 177 const base::string16& GetErrorLabelForType(autofill::ServerFieldType type); |
| 178 | 178 |
| 179 net::EmbeddedTestServer* https_server() { return https_server_.get(); } | 179 net::EmbeddedTestServer* https_server() { return https_server_.get(); } |
| 180 | 180 |
| 181 PaymentRequestDialogView* dialog_view() { return delegate_->dialog_view(); } | 181 PaymentRequestDialogView* dialog_view() { return delegate_->dialog_view(); } |
| 182 | 182 |
| 183 void SetAddressInputOverride( |
| 184 TestChromePaymentRequestDelegate::AddressInputProvider* |
| 185 address_input_provider) { |
| 186 delegate_->SetAddressInputOverride(address_input_provider); |
| 187 } |
| 188 |
| 183 // Various events that can be waited on by the DialogEventObserver. | 189 // Various events that can be waited on by the DialogEventObserver. |
| 184 enum DialogEvent : int { | 190 enum DialogEvent : int { |
| 185 DIALOG_OPENED, | 191 DIALOG_OPENED, |
| 186 DIALOG_CLOSED, | 192 DIALOG_CLOSED, |
| 187 ORDER_SUMMARY_OPENED, | 193 ORDER_SUMMARY_OPENED, |
| 188 PAYMENT_METHOD_OPENED, | 194 PAYMENT_METHOD_OPENED, |
| 189 SHIPPING_ADDRESS_SECTION_OPENED, | 195 SHIPPING_ADDRESS_SECTION_OPENED, |
| 190 SHIPPING_OPTION_SECTION_OPENED, | 196 SHIPPING_OPTION_SECTION_OPENED, |
| 191 CREDIT_CARD_EDITOR_OPENED, | 197 CREDIT_CARD_EDITOR_OPENED, |
| 192 SHIPPING_ADDRESS_EDITOR_OPENED, | 198 SHIPPING_ADDRESS_EDITOR_OPENED, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 // Weak, owned by the PaymentRequest object. | 250 // Weak, owned by the PaymentRequest object. |
| 245 TestChromePaymentRequestDelegate* delegate_; | 251 TestChromePaymentRequestDelegate* delegate_; |
| 246 bool incognito_for_testing_; | 252 bool incognito_for_testing_; |
| 247 | 253 |
| 248 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); | 254 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); |
| 249 }; | 255 }; |
| 250 | 256 |
| 251 } // namespace payments | 257 } // namespace payments |
| 252 | 258 |
| 253 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ | 259 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ |
| OLD | NEW |