| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 public PaymentRequestDialogView::ObserverForTest, | 67 public PaymentRequestDialogView::ObserverForTest, |
| 68 public views::WidgetObserver { | 68 public views::WidgetObserver { |
| 69 protected: | 69 protected: |
| 70 // Test will open a browser window to |test_file_path| (relative to | 70 // Test will open a browser window to |test_file_path| (relative to |
| 71 // chrome/test/data/payments). | 71 // chrome/test/data/payments). |
| 72 explicit PaymentRequestBrowserTestBase(const std::string& test_file_path); | 72 explicit PaymentRequestBrowserTestBase(const std::string& test_file_path); |
| 73 ~PaymentRequestBrowserTestBase() override; | 73 ~PaymentRequestBrowserTestBase() override; |
| 74 | 74 |
| 75 void SetUpOnMainThread() override; | 75 void SetUpOnMainThread() override; |
| 76 | 76 |
| 77 void NavigateTo(const std::string& file_path); |
| 78 |
| 77 void SetIncognito(); | 79 void SetIncognito(); |
| 78 void SetInvalidSsl(); | 80 void SetInvalidSsl(); |
| 79 | 81 |
| 80 // PaymentRequest::ObserverForTest: | 82 // PaymentRequest::ObserverForTest: |
| 81 void OnCanMakePaymentCalled() override; | 83 void OnCanMakePaymentCalled() override; |
| 82 void OnNotSupportedError() override; | 84 void OnNotSupportedError() override; |
| 83 | 85 |
| 84 // PaymentRequestDialogView::ObserverForTest: | 86 // PaymentRequestDialogView::ObserverForTest: |
| 85 void OnDialogOpened() override; | 87 void OnDialogOpened() override; |
| 86 void OnOrderSummaryOpened() override; | 88 void OnOrderSummaryOpened() override; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 114 // associated action to happen. | 116 // associated action to happen. |
| 115 void OpenOrderSummaryScreen(); | 117 void OpenOrderSummaryScreen(); |
| 116 void OpenPaymentMethodScreen(); | 118 void OpenPaymentMethodScreen(); |
| 117 void OpenShippingAddressSectionScreen(); | 119 void OpenShippingAddressSectionScreen(); |
| 118 void OpenShippingOptionSectionScreen(); | 120 void OpenShippingOptionSectionScreen(); |
| 119 void OpenContactInfoScreen(); | 121 void OpenContactInfoScreen(); |
| 120 void OpenCreditCardEditorScreen(); | 122 void OpenCreditCardEditorScreen(); |
| 121 void OpenShippingAddressEditorScreen(); | 123 void OpenShippingAddressEditorScreen(); |
| 122 void OpenContactInfoEditorScreen(); | 124 void OpenContactInfoEditorScreen(); |
| 123 void ClickOnBackArrow(); | 125 void ClickOnBackArrow(); |
| 126 void ClickOnCancel(); |
| 124 | 127 |
| 125 content::WebContents* GetActiveWebContents(); | 128 content::WebContents* GetActiveWebContents(); |
| 126 | 129 |
| 127 // Convenience method to get a list of PaymentRequest associated with | 130 // Convenience method to get a list of PaymentRequest associated with |
| 128 // |web_contents|. | 131 // |web_contents|. |
| 129 const std::vector<PaymentRequest*> GetPaymentRequests( | 132 const std::vector<PaymentRequest*> GetPaymentRequests( |
| 130 content::WebContents* web_contents); | 133 content::WebContents* web_contents); |
| 131 | 134 |
| 132 autofill::PersonalDataManager* GetDataManager(); | 135 autofill::PersonalDataManager* GetDataManager(); |
| 133 // Adds the various models to the database, waiting until the personal data | 136 // Adds the various models to the database, waiting until the personal data |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 TestChromePaymentRequestDelegate* delegate_; | 266 TestChromePaymentRequestDelegate* delegate_; |
| 264 bool is_incognito_; | 267 bool is_incognito_; |
| 265 bool is_valid_ssl_; | 268 bool is_valid_ssl_; |
| 266 | 269 |
| 267 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); | 270 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); |
| 268 }; | 271 }; |
| 269 | 272 |
| 270 } // namespace payments | 273 } // namespace payments |
| 271 | 274 |
| 272 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ | 275 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ |
| OLD | NEW |