| 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 <iosfwd> | 8 #include <iosfwd> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 BACK_NAVIGATION, | 76 BACK_NAVIGATION, |
| 77 BACK_TO_PAYMENT_SHEET_NAVIGATION, | 77 BACK_TO_PAYMENT_SHEET_NAVIGATION, |
| 78 CONTACT_INFO_OPENED, | 78 CONTACT_INFO_OPENED, |
| 79 EDITOR_VIEW_UPDATED, | 79 EDITOR_VIEW_UPDATED, |
| 80 CAN_MAKE_PAYMENT_CALLED, | 80 CAN_MAKE_PAYMENT_CALLED, |
| 81 ERROR_MESSAGE_SHOWN, | 81 ERROR_MESSAGE_SHOWN, |
| 82 SPEC_DONE_UPDATING, | 82 SPEC_DONE_UPDATING, |
| 83 CVC_PROMPT_SHOWN, | 83 CVC_PROMPT_SHOWN, |
| 84 NOT_SUPPORTED_ERROR, | 84 NOT_SUPPORTED_ERROR, |
| 85 ABORT_CALLED, | 85 ABORT_CALLED, |
| 86 EDITOR_VALIDATION_ERROR, |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 protected: | 89 protected: |
| 89 // Test will open a browser window to |test_file_path| (relative to | 90 // Test will open a browser window to |test_file_path| (relative to |
| 90 // chrome/test/data/payments). | 91 // chrome/test/data/payments). |
| 91 explicit PaymentRequestBrowserTestBase(const std::string& test_file_path); | 92 explicit PaymentRequestBrowserTestBase(const std::string& test_file_path); |
| 92 ~PaymentRequestBrowserTestBase() override; | 93 ~PaymentRequestBrowserTestBase() override; |
| 93 | 94 |
| 94 void SetUpCommandLine(base::CommandLine* command_line) override; | 95 void SetUpCommandLine(base::CommandLine* command_line) override; |
| 95 void SetUpOnMainThread() override; | 96 void SetUpOnMainThread() override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 114 void OnCreditCardEditorOpened() override; | 115 void OnCreditCardEditorOpened() override; |
| 115 void OnShippingAddressEditorOpened() override; | 116 void OnShippingAddressEditorOpened() override; |
| 116 void OnContactInfoEditorOpened() override; | 117 void OnContactInfoEditorOpened() override; |
| 117 void OnBackNavigation() override; | 118 void OnBackNavigation() override; |
| 118 void OnBackToPaymentSheetNavigation() override; | 119 void OnBackToPaymentSheetNavigation() override; |
| 119 void OnContactInfoOpened() override; | 120 void OnContactInfoOpened() override; |
| 120 void OnEditorViewUpdated() override; | 121 void OnEditorViewUpdated() override; |
| 121 void OnErrorMessageShown() override; | 122 void OnErrorMessageShown() override; |
| 122 void OnSpecDoneUpdating() override; | 123 void OnSpecDoneUpdating() override; |
| 123 void OnCvcPromptShown() override; | 124 void OnCvcPromptShown() override; |
| 125 void OnEditorValidationError() override; |
| 124 | 126 |
| 125 // Will call JavaScript to invoke the PaymentRequest dialog and verify that | 127 // Will call JavaScript to invoke the PaymentRequest dialog and verify that |
| 126 // it's open. | 128 // it's open. |
| 127 void InvokePaymentRequestUI(); | 129 void InvokePaymentRequestUI(); |
| 128 | 130 |
| 129 // Will expect that all strings in |expected_strings| are present in output. | 131 // Will expect that all strings in |expected_strings| are present in output. |
| 130 void ExpectBodyContains(const std::vector<std::string>& expected_strings); | 132 void ExpectBodyContains(const std::vector<std::string>& expected_strings); |
| 131 void ExpectBodyContains(const std::vector<base::string16>& expected_strings); | 133 void ExpectBodyContains(const std::vector<base::string16>& expected_strings); |
| 132 | 134 |
| 133 // Utility functions that will click on Dialog views and wait for the | 135 // Utility functions that will click on Dialog views and wait for the |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); | 273 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); |
| 272 }; | 274 }; |
| 273 | 275 |
| 274 } // namespace payments | 276 } // namespace payments |
| 275 | 277 |
| 276 std::ostream& operator<<( | 278 std::ostream& operator<<( |
| 277 std::ostream& out, | 279 std::ostream& out, |
| 278 payments::PaymentRequestBrowserTestBase::DialogEvent event); | 280 payments::PaymentRequestBrowserTestBase::DialogEvent event); |
| 279 | 281 |
| 280 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ | 282 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ |
| OLD | NEW |