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