Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_browsertest_base.h

Issue 2816083002: [WebPayments] Desktop implementation of Contact Editor (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void OnNotSupportedError() override; 79 void OnNotSupportedError() override;
80 80
81 // PaymentRequestDialogView::ObserverForTest: 81 // PaymentRequestDialogView::ObserverForTest:
82 void OnDialogOpened() override; 82 void OnDialogOpened() override;
83 void OnOrderSummaryOpened() override; 83 void OnOrderSummaryOpened() override;
84 void OnPaymentMethodOpened() override; 84 void OnPaymentMethodOpened() override;
85 void OnShippingAddressSectionOpened() override; 85 void OnShippingAddressSectionOpened() override;
86 void OnShippingOptionSectionOpened() override; 86 void OnShippingOptionSectionOpened() override;
87 void OnCreditCardEditorOpened() override; 87 void OnCreditCardEditorOpened() override;
88 void OnShippingAddressEditorOpened() override; 88 void OnShippingAddressEditorOpened() override;
89 void OnContactInfoEditorOpened() override;
89 void OnBackNavigation() override; 90 void OnBackNavigation() override;
90 void OnBackToPaymentSheetNavigation() override; 91 void OnBackToPaymentSheetNavigation() override;
91 void OnContactInfoOpened() override; 92 void OnContactInfoOpened() override;
92 void OnEditorViewUpdated() override; 93 void OnEditorViewUpdated() override;
93 void OnErrorMessageShown() override; 94 void OnErrorMessageShown() override;
94 void OnSpecDoneUpdating() override; 95 void OnSpecDoneUpdating() override;
95 void OnCvcPromptShown() override; 96 void OnCvcPromptShown() override;
96 97
97 // views::WidgetObserver 98 // views::WidgetObserver
98 // Effective way to be warned of all dialog closures. 99 // Effective way to be warned of all dialog closures.
99 void OnWidgetDestroyed(views::Widget* widget) override; 100 void OnWidgetDestroyed(views::Widget* widget) override;
100 101
101 // Will call JavaScript to invoke the PaymentRequest dialog and verify that 102 // Will call JavaScript to invoke the PaymentRequest dialog and verify that
102 // it's open. 103 // it's open.
103 void InvokePaymentRequestUI(); 104 void InvokePaymentRequestUI();
104 105
105 // Will expect that all strings in |expected_strings| are present in output. 106 // Will expect that all strings in |expected_strings| are present in output.
106 void ExpectBodyContains(const std::vector<std::string>& expected_strings); 107 void ExpectBodyContains(const std::vector<std::string>& expected_strings);
107 void ExpectBodyContains(const std::vector<base::string16>& expected_strings); 108 void ExpectBodyContains(const std::vector<base::string16>& expected_strings);
108 109
109 // Utility functions that will click on Dialog views and wait for the 110 // Utility functions that will click on Dialog views and wait for the
110 // associated action to happen. 111 // associated action to happen.
111 void OpenOrderSummaryScreen(); 112 void OpenOrderSummaryScreen();
112 void OpenPaymentMethodScreen(); 113 void OpenPaymentMethodScreen();
113 void OpenShippingAddressSectionScreen(); 114 void OpenShippingAddressSectionScreen();
114 void OpenShippingOptionSectionScreen(); 115 void OpenShippingOptionSectionScreen();
116 void OpenContactInfoScreen();
115 void OpenCreditCardEditorScreen(); 117 void OpenCreditCardEditorScreen();
116 void OpenShippingAddressEditorScreen(); 118 void OpenShippingAddressEditorScreen();
119 void OpenContactInfoEditorScreen();
117 void ClickOnBackArrow(); 120 void ClickOnBackArrow();
118 121
119 content::WebContents* GetActiveWebContents(); 122 content::WebContents* GetActiveWebContents();
120 123
121 // Convenience method to get a list of PaymentRequest associated with 124 // Convenience method to get a list of PaymentRequest associated with
122 // |web_contents|. 125 // |web_contents|.
123 const std::vector<PaymentRequest*> GetPaymentRequests( 126 const std::vector<PaymentRequest*> GetPaymentRequests(
124 content::WebContents* web_contents); 127 content::WebContents* web_contents);
125 128
126 autofill::PersonalDataManager* GetDataManager(); 129 autofill::PersonalDataManager* GetDataManager();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // Various events that can be waited on by the DialogEventObserver. 196 // Various events that can be waited on by the DialogEventObserver.
194 enum DialogEvent : int { 197 enum DialogEvent : int {
195 DIALOG_OPENED, 198 DIALOG_OPENED,
196 DIALOG_CLOSED, 199 DIALOG_CLOSED,
197 ORDER_SUMMARY_OPENED, 200 ORDER_SUMMARY_OPENED,
198 PAYMENT_METHOD_OPENED, 201 PAYMENT_METHOD_OPENED,
199 SHIPPING_ADDRESS_SECTION_OPENED, 202 SHIPPING_ADDRESS_SECTION_OPENED,
200 SHIPPING_OPTION_SECTION_OPENED, 203 SHIPPING_OPTION_SECTION_OPENED,
201 CREDIT_CARD_EDITOR_OPENED, 204 CREDIT_CARD_EDITOR_OPENED,
202 SHIPPING_ADDRESS_EDITOR_OPENED, 205 SHIPPING_ADDRESS_EDITOR_OPENED,
206 CONTACT_INFO_EDITOR_OPENED,
203 BACK_NAVIGATION, 207 BACK_NAVIGATION,
204 BACK_TO_PAYMENT_SHEET_NAVIGATION, 208 BACK_TO_PAYMENT_SHEET_NAVIGATION,
205 CONTACT_INFO_OPENED, 209 CONTACT_INFO_OPENED,
206 EDITOR_VIEW_UPDATED, 210 EDITOR_VIEW_UPDATED,
207 CAN_MAKE_PAYMENT_CALLED, 211 CAN_MAKE_PAYMENT_CALLED,
208 ERROR_MESSAGE_SHOWN, 212 ERROR_MESSAGE_SHOWN,
209 SPEC_DONE_UPDATING, 213 SPEC_DONE_UPDATING,
210 CVC_PROMPT_SHOWN, 214 CVC_PROMPT_SHOWN,
211 NOT_SUPPORTED_ERROR, 215 NOT_SUPPORTED_ERROR,
212 }; 216 };
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 TestChromePaymentRequestDelegate* delegate_; 261 TestChromePaymentRequestDelegate* delegate_;
258 bool is_incognito_; 262 bool is_incognito_;
259 bool is_valid_ssl_; 263 bool is_valid_ssl_;
260 264
261 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); 265 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase);
262 }; 266 };
263 267
264 } // namespace payments 268 } // namespace payments
265 269
266 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ 270 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698