| Index: chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| diff --git a/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc b/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| index 546362309ec737ca2865cc18f801bb32a008e369..3ff6a023fedd747619e1508001123097c441a2b2 100644
|
| --- a/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| +++ b/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| @@ -208,19 +208,45 @@ void PaymentRequestBrowserTestBase::OpenOrderSummaryScreen() {
|
| void PaymentRequestBrowserTestBase::OpenPaymentMethodScreen() {
|
| ResetEventObserver(DialogEvent::PAYMENT_METHOD_OPENED);
|
|
|
| - ClickOnDialogViewAndWait(DialogViewID::PAYMENT_SHEET_PAYMENT_METHOD_SECTION);
|
| + views::View* view = delegate_->dialog_view()->GetViewByID(
|
| + static_cast<int>(DialogViewID::PAYMENT_SHEET_PAYMENT_METHOD_SECTION));
|
| + if (!view) {
|
| + view = delegate_->dialog_view()->GetViewByID(static_cast<int>(
|
| + DialogViewID::PAYMENT_SHEET_PAYMENT_METHOD_SECTION_BUTTON));
|
| + }
|
| +
|
| + EXPECT_TRUE(view);
|
| +
|
| + ClickOnDialogViewAndWait(view);
|
| }
|
|
|
| void PaymentRequestBrowserTestBase::OpenShippingAddressSectionScreen() {
|
| ResetEventObserver(DialogEvent::SHIPPING_ADDRESS_SECTION_OPENED);
|
|
|
| - ClickOnDialogViewAndWait(
|
| - DialogViewID::PAYMENT_SHEET_SHIPPING_ADDRESS_SECTION);
|
| + views::View* view = delegate_->dialog_view()->GetViewByID(
|
| + static_cast<int>(DialogViewID::PAYMENT_SHEET_SHIPPING_ADDRESS_SECTION));
|
| + if (!view) {
|
| + view = delegate_->dialog_view()->GetViewByID(static_cast<int>(
|
| + DialogViewID::PAYMENT_SHEET_SHIPPING_ADDRESS_SECTION_BUTTON));
|
| + }
|
| +
|
| + EXPECT_TRUE(view);
|
| +
|
| + ClickOnDialogViewAndWait(view);
|
| }
|
|
|
| void PaymentRequestBrowserTestBase::OpenShippingOptionSectionScreen() {
|
| ResetEventObserver(DialogEvent::SHIPPING_OPTION_SECTION_OPENED);
|
|
|
| + views::View* view = delegate_->dialog_view()->GetViewByID(
|
| + static_cast<int>(DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION));
|
| + if (!view) {
|
| + view = delegate_->dialog_view()->GetViewByID(static_cast<int>(
|
| + DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION_BUTTON));
|
| + }
|
| +
|
| + EXPECT_TRUE(view);
|
| +
|
| ClickOnDialogViewAndWait(DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION);
|
| }
|
| void PaymentRequestBrowserTestBase::OpenCreditCardEditorScreen() {
|
|
|