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

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: Rebase 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 33c2d55416f5482ad5c773b14144469799902cb5..fdfe04fae851d9cb7168009f3a802ee9332f7d4c 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
@@ -114,4 +114,22 @@ IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest,
request->state()->selected_instrument());
}
+IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, EditButtonOpensEditor) {
+ AddCreditCard(autofill::test::GetCreditCard());
+
+ 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