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

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

Issue 2676663002: [Payments] Implements the credit card editor for Desktop UI (Closed)
Patch Set: formatting 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 23dccc43eb9cae8335c71d43ebab602d15f3006a..85f6b7f85512a1430a8d5caf1b5026b09c61c922 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
@@ -48,6 +48,9 @@ class PaymentRequestInteractiveTestBase
// PaymentRequestDialogView::ObserverForTest
void OnDialogOpened() override;
void OnOrderSummaryOpened() override;
+ void OnPaymentMethodOpened() override;
+ void OnCreditCardEditorOpened() override;
+ void OnBackNavigation() override;
// views::WidgetObserver
// Effective way to be warned of all dialog closures.
@@ -57,7 +60,11 @@ class PaymentRequestInteractiveTestBase
// it's open.
void InvokePaymentRequestUI();
+ // Utility functions that will click on Dialog views and wait for the
+ // associated action to happen.
void OpenOrderSummaryScreen();
+ void OpenPaymentMethodScreen();
+ void OpenCreditCardEditorScreen();
// Convenience method to get a list of PaymentRequest associated with
// |web_contents|.
@@ -70,8 +77,12 @@ class PaymentRequestInteractiveTestBase
content::WebContents* web_contents,
mojo::InterfaceRequest<payments::mojom::PaymentRequest> request);
- // Click on a view from within the dialog.
- void ClickOnDialogView(DialogViewID view_id);
+ // Click on a view from within the dialog and waits for an observed event
+ // to be observed.
+ void ClickOnDialogViewAndWait(DialogViewID view_id);
+
+ // Sets proper animation delegates and waits for animation to finish.
+ void WaitForAnimation();
// Returns the text of the StyledLabel with the specific |view_id| that is a
// child of the Payment Request dialog view.
@@ -82,10 +93,13 @@ class PaymentRequestInteractiveTestBase
PaymentRequestDialogView* dialog_view() { return delegate_->dialog_view(); }
// Various events that can be waited on by the DialogEventObserver.
- enum DialogEvent {
+ enum DialogEvent : int {
DIALOG_OPENED,
DIALOG_CLOSED,
ORDER_SUMMARY_OPENED,
+ PAYMENT_METHOD_OPENED,
+ CREDIT_CARD_EDITOR_OPENED,
+ BACK_NAVIGATION,
};
// DialogEventObserver is used to wait on specific events that may have

Powered by Google App Engine
This is Rietveld 408576698