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

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

Issue 2715533002: [Payments] Add error messages to credit card editor. (Closed)
Patch Set: clean Created 3 years, 10 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_INTERACTIVE_UITEST_BASE _H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_BASE _H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_BASE _H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // an invalid state. 94 // an invalid state.
95 bool IsEditorTextfieldInvalid(autofill::ServerFieldType type); 95 bool IsEditorTextfieldInvalid(autofill::ServerFieldType type);
96 bool IsEditorComboboxInvalid(autofill::ServerFieldType type); 96 bool IsEditorComboboxInvalid(autofill::ServerFieldType type);
97 97
98 // Sets proper animation delegates and waits for animation to finish. 98 // Sets proper animation delegates and waits for animation to finish.
99 void WaitForAnimation(); 99 void WaitForAnimation();
100 100
101 // Returns the text of the StyledLabel with the specific |view_id| that is a 101 // Returns the text of the StyledLabel with the specific |view_id| that is a
102 // child of the Payment Request dialog view. 102 // child of the Payment Request dialog view.
103 const base::string16& GetStyledLabelText(DialogViewID view_id); 103 const base::string16& GetStyledLabelText(DialogViewID view_id);
104 // Returns the error label text associated with a given field |type|.
105 const base::string16& GetErrorLabelForType(autofill::ServerFieldType type);
104 106
105 net::EmbeddedTestServer* https_server() { return https_server_.get(); } 107 net::EmbeddedTestServer* https_server() { return https_server_.get(); }
106 108
107 PaymentRequestDialogView* dialog_view() { return delegate_->dialog_view(); } 109 PaymentRequestDialogView* dialog_view() { return delegate_->dialog_view(); }
108 110
109 // Various events that can be waited on by the DialogEventObserver. 111 // Various events that can be waited on by the DialogEventObserver.
110 enum DialogEvent : int { 112 enum DialogEvent : int {
111 DIALOG_OPENED, 113 DIALOG_OPENED,
112 DIALOG_CLOSED, 114 DIALOG_CLOSED,
113 ORDER_SUMMARY_OPENED, 115 ORDER_SUMMARY_OPENED,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 std::unique_ptr<net::EmbeddedTestServer> https_server_; 160 std::unique_ptr<net::EmbeddedTestServer> https_server_;
159 // Weak, owned by the PaymentRequest object. 161 // Weak, owned by the PaymentRequest object.
160 TestChromePaymentRequestDelegate* delegate_; 162 TestChromePaymentRequestDelegate* delegate_;
161 163
162 DISALLOW_COPY_AND_ASSIGN(PaymentRequestInteractiveTestBase); 164 DISALLOW_COPY_AND_ASSIGN(PaymentRequestInteractiveTestBase);
163 }; 165 };
164 166
165 } // namespace payments 167 } // namespace payments
166 168
167 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_B ASE_H_ 169 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_B ASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698