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

Unified Diff: chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h

Issue 2715213005: [Payments] Add the pay button, and control its enabled state (Closed)
Patch Set: addressed comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
diff --git a/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h b/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
index cf0149b7f2cc9e25306eae97ab73bfc4e993c6bd..fd14429442bd07047b50f5b0133f3b3470626681 100644
--- a/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
+++ b/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
@@ -21,6 +21,11 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/views/widget/widget_observer.h"
+namespace autofill {
+class AutofillProfile;
+class CreditCard;
+}
+
namespace content {
class WebContents;
} // namespace content
@@ -95,6 +100,13 @@ class PaymentRequestInteractiveTestBase
content::WebContents* web_contents);
autofill::PersonalDataManager* GetDataManager();
+ // Adds the various models to the database, waiting until the personal data
+ // manager notifies that they are added.
+ // NOTE: If no use_count is specified on the models and multiple items are
+ // inserted, the order in which they are returned is undefined, since they
+ // are added close to each other.
+ void AddAutofillProfile(const autofill::AutofillProfile& profile);
+ void AddCreditCard(const autofill::CreditCard& card);
void CreatePaymentRequestForTest(
content::WebContents* web_contents,
@@ -117,6 +129,8 @@ class PaymentRequestInteractiveTestBase
bool IsEditorTextfieldInvalid(autofill::ServerFieldType type);
bool IsEditorComboboxInvalid(autofill::ServerFieldType type);
+ bool IsPayButtonEnabled();
+
// Sets proper animation delegates and waits for animation to finish.
void WaitForAnimation();

Powered by Google App Engine
This is Rietveld 408576698