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

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

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: BUILD Created 3 years, 8 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void OnOrderSummaryOpened() override; 81 void OnOrderSummaryOpened() override;
82 void OnPaymentMethodOpened() override; 82 void OnPaymentMethodOpened() override;
83 void OnShippingSectionOpened() override; 83 void OnShippingSectionOpened() override;
84 void OnCreditCardEditorOpened() override; 84 void OnCreditCardEditorOpened() override;
85 void OnShippingAddressEditorOpened() override; 85 void OnShippingAddressEditorOpened() override;
86 void OnBackNavigation() override; 86 void OnBackNavigation() override;
87 void OnContactInfoOpened() override; 87 void OnContactInfoOpened() override;
88 void OnEditorViewUpdated() override; 88 void OnEditorViewUpdated() override;
89 void OnErrorMessageShown() override; 89 void OnErrorMessageShown() override;
90 void OnSpecDoneUpdating() override; 90 void OnSpecDoneUpdating() override;
91 void OnCvcPromptShown() override;
91 92
92 // views::WidgetObserver 93 // views::WidgetObserver
93 // Effective way to be warned of all dialog closures. 94 // Effective way to be warned of all dialog closures.
94 void OnWidgetDestroyed(views::Widget* widget) override; 95 void OnWidgetDestroyed(views::Widget* widget) override;
95 96
96 // Will call JavaScript to invoke the PaymentRequest dialog and verify that 97 // Will call JavaScript to invoke the PaymentRequest dialog and verify that
97 // it's open. 98 // it's open.
98 void InvokePaymentRequestUI(); 99 void InvokePaymentRequestUI();
99 100
100 // Will expect that all strings in |expected_strings| are present in output. 101 // Will expect that all strings in |expected_strings| are present in output.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void ClickOnChildInListViewAndWait(int child_index, 139 void ClickOnChildInListViewAndWait(int child_index,
139 int total_num_children, 140 int total_num_children,
140 DialogViewID list_view_id); 141 DialogViewID list_view_id);
141 // Returns "three-line label" values under |parent_view|. 142 // Returns "three-line label" values under |parent_view|.
142 std::vector<base::string16> GetThreeLineLabelValues( 143 std::vector<base::string16> GetThreeLineLabelValues(
143 DialogViewID parent_view_id); 144 DialogViewID parent_view_id);
144 // Returns the shipping option labels under |parent_view_id|. 145 // Returns the shipping option labels under |parent_view_id|.
145 std::vector<base::string16> GetShippingOptionLabelValues( 146 std::vector<base::string16> GetShippingOptionLabelValues(
146 DialogViewID parent_view_id); 147 DialogViewID parent_view_id);
147 148
149 void OpenCVCPromptWithCVC(const base::string16& cvc);
150 void PayWithCreditCardAndWait(const base::string16& cvc);
151
148 // Setting the |value| in the textfield of a given |type|. 152 // Setting the |value| in the textfield of a given |type|.
149 void SetEditorTextfieldValue(const base::string16& value, 153 void SetEditorTextfieldValue(const base::string16& value,
150 autofill::ServerFieldType type); 154 autofill::ServerFieldType type);
151 // Setting the |value| in the combobox of a given |type|. 155 // Setting the |value| in the combobox of a given |type|.
152 void SetComboboxValue(const base::string16& value, 156 void SetComboboxValue(const base::string16& value,
153 autofill::ServerFieldType type); 157 autofill::ServerFieldType type);
154 158
155 // Whether the editor textfield/combobox for the given |type| is currently in 159 // Whether the editor textfield/combobox for the given |type| is currently in
156 // an invalid state. 160 // an invalid state.
157 bool IsEditorTextfieldInvalid(autofill::ServerFieldType type); 161 bool IsEditorTextfieldInvalid(autofill::ServerFieldType type);
(...skipping 22 matching lines...) Expand all
180 PAYMENT_METHOD_OPENED, 184 PAYMENT_METHOD_OPENED,
181 SHIPPING_SECTION_OPENED, 185 SHIPPING_SECTION_OPENED,
182 CREDIT_CARD_EDITOR_OPENED, 186 CREDIT_CARD_EDITOR_OPENED,
183 SHIPPING_ADDRESS_EDITOR_OPENED, 187 SHIPPING_ADDRESS_EDITOR_OPENED,
184 BACK_NAVIGATION, 188 BACK_NAVIGATION,
185 CONTACT_INFO_OPENED, 189 CONTACT_INFO_OPENED,
186 EDITOR_VIEW_UPDATED, 190 EDITOR_VIEW_UPDATED,
187 CAN_MAKE_PAYMENT_CALLED, 191 CAN_MAKE_PAYMENT_CALLED,
188 ERROR_MESSAGE_SHOWN, 192 ERROR_MESSAGE_SHOWN,
189 SPEC_DONE_UPDATING, 193 SPEC_DONE_UPDATING,
194 CVC_PROMPT_SHOWN,
190 }; 195 };
191 196
192 // DialogEventObserver is used to wait on specific events that may have 197 // DialogEventObserver is used to wait on specific events that may have
193 // occured before the call to Wait(), or after, in which case a RunLoop is 198 // occured before the call to Wait(), or after, in which case a RunLoop is
194 // used. 199 // used.
195 // 200 //
196 // Usage: 201 // Usage:
197 // observer_ = 202 // observer_ =
198 // base::MakeUnique<DialogEventObserver>(std:list<DialogEvent>(...)); 203 // base::MakeUnique<DialogEventObserver>(std:list<DialogEvent>(...));
199 // 204 //
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // Weak, owned by the PaymentRequest object. 239 // Weak, owned by the PaymentRequest object.
235 TestChromePaymentRequestDelegate* delegate_; 240 TestChromePaymentRequestDelegate* delegate_;
236 bool incognito_for_testing_; 241 bool incognito_for_testing_;
237 242
238 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); 243 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase);
239 }; 244 };
240 245
241 } // namespace payments 246 } // namespace payments
242 247
243 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ 248 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698