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

Unified Diff: chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc

Issue 2872623002: [Web Payments] Add "pencil" edit button to lists. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc
diff --git a/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc
index a95524e5c2eedf2a9428d8d5cbe9456960a8f24d..20d1b4efa3431bdf8d5a0a690e62e42b24adbe05 100644
--- a/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc
+++ b/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc
@@ -105,4 +105,23 @@ IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest,
request->state()->selected_instrument());
}
+IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, EditButtonOpensEditor) {
+ const autofill::CreditCard card = autofill::test::GetCreditCard();
+ AddCreditCard(card);
Mathieu 2017/05/08 14:08:02 nit: you can inline autofill::test::GetCreditCard(
anthonyvd 2017/05/08 14:45:53 Done.
+
+ InvokePaymentRequestUI();
+ OpenPaymentMethodScreen();
+
+ views::View* list_view = dialog_view()->GetViewByID(
+ static_cast<int>(DialogViewID::PAYMENT_METHOD_SHEET_LIST_VIEW));
+ EXPECT_TRUE(list_view);
+ EXPECT_EQ(1, list_view->child_count());
+
+ views::View* edit_button = list_view->child_at(0)->GetViewByID(
+ static_cast<int>(DialogViewID::EDIT_ITEM_BUTTON));
+
+ ResetEventObserver(DialogEvent::CREDIT_CARD_EDITOR_OPENED);
+ ClickOnDialogViewAndWait(edit_button);
+}
+
} // namespace payments

Powered by Google App Engine
This is Rietveld 408576698