OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" | 5 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iostream> | 8 #include <iostream> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 combobox->OnBlur(); | 585 combobox->OnBlur(); |
586 } | 586 } |
587 | 587 |
588 void PaymentRequestBrowserTestBase::SelectBillingAddress( | 588 void PaymentRequestBrowserTestBase::SelectBillingAddress( |
589 const std::string& billing_address_id) { | 589 const std::string& billing_address_id) { |
590 views::Combobox* address_combobox(static_cast<views::Combobox*>( | 590 views::Combobox* address_combobox(static_cast<views::Combobox*>( |
591 dialog_view()->GetViewByID(static_cast<int>(kBillingAddressType)))); | 591 dialog_view()->GetViewByID(static_cast<int>(kBillingAddressType)))); |
592 ASSERT_NE(address_combobox, nullptr); | 592 ASSERT_NE(address_combobox, nullptr); |
593 autofill::AddressComboboxModel* address_combobox_model( | 593 autofill::AddressComboboxModel* address_combobox_model( |
594 static_cast<autofill::AddressComboboxModel*>(address_combobox->model())); | 594 static_cast<autofill::AddressComboboxModel*>(address_combobox->model())); |
595 address_combobox->SetSelectedIndex( | 595 address_combobox->SetSelectedRow( |
596 address_combobox_model->GetIndexOfIdentifier(billing_address_id)); | 596 address_combobox_model->GetIndexOfIdentifier(billing_address_id)); |
| 597 address_combobox->OnBlur(); |
597 } | 598 } |
598 | 599 |
599 bool PaymentRequestBrowserTestBase::IsEditorTextfieldInvalid( | 600 bool PaymentRequestBrowserTestBase::IsEditorTextfieldInvalid( |
600 autofill::ServerFieldType type) { | 601 autofill::ServerFieldType type) { |
601 ValidatingTextfield* textfield = static_cast<ValidatingTextfield*>( | 602 ValidatingTextfield* textfield = static_cast<ValidatingTextfield*>( |
602 delegate_->dialog_view()->GetViewByID(static_cast<int>(type))); | 603 delegate_->dialog_view()->GetViewByID(static_cast<int>(type))); |
603 DCHECK(textfield); | 604 DCHECK(textfield); |
604 return textfield->invalid(); | 605 return textfield->invalid(); |
605 } | 606 } |
606 | 607 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 break; | 760 break; |
760 case DialogEvent::NOT_SUPPORTED_ERROR: | 761 case DialogEvent::NOT_SUPPORTED_ERROR: |
761 out << "NOT_SUPPORTED_ERROR"; | 762 out << "NOT_SUPPORTED_ERROR"; |
762 break; | 763 break; |
763 case DialogEvent::ABORT_CALLED: | 764 case DialogEvent::ABORT_CALLED: |
764 out << "ABORT_CALLED"; | 765 out << "ABORT_CALLED"; |
765 break; | 766 break; |
766 } | 767 } |
767 return out; | 768 return out; |
768 } | 769 } |
OLD | NEW |