| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void OnContactInfoOpened() override; | 80 void OnContactInfoOpened() override; |
| 81 | 81 |
| 82 // views::WidgetObserver | 82 // views::WidgetObserver |
| 83 // Effective way to be warned of all dialog closures. | 83 // Effective way to be warned of all dialog closures. |
| 84 void OnWidgetDestroyed(views::Widget* widget) override; | 84 void OnWidgetDestroyed(views::Widget* widget) override; |
| 85 | 85 |
| 86 // Will call JavaScript to invoke the PaymentRequest dialog and verify that | 86 // Will call JavaScript to invoke the PaymentRequest dialog and verify that |
| 87 // it's open. | 87 // it's open. |
| 88 void InvokePaymentRequestUI(); | 88 void InvokePaymentRequestUI(); |
| 89 | 89 |
| 90 // Will expect that all strings in |expected_strings| are present in output. |
| 91 void ExpectBodyContains(const std::vector<base::string16>& expected_strings); |
| 92 |
| 90 // Utility functions that will click on Dialog views and wait for the | 93 // Utility functions that will click on Dialog views and wait for the |
| 91 // associated action to happen. | 94 // associated action to happen. |
| 92 void OpenOrderSummaryScreen(); | 95 void OpenOrderSummaryScreen(); |
| 93 void OpenPaymentMethodScreen(); | 96 void OpenPaymentMethodScreen(); |
| 94 void OpenCreditCardEditorScreen(); | 97 void OpenCreditCardEditorScreen(); |
| 95 | 98 |
| 96 content::WebContents* GetActiveWebContents(); | 99 content::WebContents* GetActiveWebContents(); |
| 97 | 100 |
| 98 // Convenience method to get a list of PaymentRequest associated with | 101 // Convenience method to get a list of PaymentRequest associated with |
| 99 // |web_contents|. | 102 // |web_contents|. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 std::unique_ptr<net::EmbeddedTestServer> https_server_; | 201 std::unique_ptr<net::EmbeddedTestServer> https_server_; |
| 199 // Weak, owned by the PaymentRequest object. | 202 // Weak, owned by the PaymentRequest object. |
| 200 TestChromePaymentRequestDelegate* delegate_; | 203 TestChromePaymentRequestDelegate* delegate_; |
| 201 | 204 |
| 202 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); | 205 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); |
| 203 }; | 206 }; |
| 204 | 207 |
| 205 } // namespace payments | 208 } // namespace payments |
| 206 | 209 |
| 207 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ | 210 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ |
| OLD | NEW |