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

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

Issue 2895473005: [Payments] Have expiration date be on the same line in CC editor (Closed)
Patch Set: addressed comments 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_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 63408a9643fc1eb720ac69c5f8f5adb5296c443e..dc944340a74fed8d401529966fff99c66256a307 100644
--- a/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
+++ b/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/views/payments/editor_view_controller.h"
#include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
#include "chrome/browser/ui/views/payments/validating_combobox.h"
#include "chrome/browser/ui/views/payments/validating_textfield.h"
@@ -549,8 +550,9 @@ void PaymentRequestBrowserTestBase::PayWithCreditCardAndWait(
base::string16 PaymentRequestBrowserTestBase::GetEditorTextfieldValue(
autofill::ServerFieldType type) {
- ValidatingTextfield* textfield = static_cast<ValidatingTextfield*>(
- delegate_->dialog_view()->GetViewByID(static_cast<int>(type)));
+ ValidatingTextfield* textfield =
+ static_cast<ValidatingTextfield*>(delegate_->dialog_view()->GetViewByID(
+ EditorViewController::GetInputFieldViewId(type)));
DCHECK(textfield);
return textfield->text();
}
@@ -558,8 +560,9 @@ base::string16 PaymentRequestBrowserTestBase::GetEditorTextfieldValue(
void PaymentRequestBrowserTestBase::SetEditorTextfieldValue(
const base::string16& value,
autofill::ServerFieldType type) {
- ValidatingTextfield* textfield = static_cast<ValidatingTextfield*>(
- delegate_->dialog_view()->GetViewByID(static_cast<int>(type)));
+ ValidatingTextfield* textfield =
+ static_cast<ValidatingTextfield*>(delegate_->dialog_view()->GetViewByID(
+ EditorViewController::GetInputFieldViewId(type)));
DCHECK(textfield);
textfield->SetText(value);
textfield->OnContentsChanged();
@@ -568,8 +571,9 @@ void PaymentRequestBrowserTestBase::SetEditorTextfieldValue(
base::string16 PaymentRequestBrowserTestBase::GetComboboxValue(
autofill::ServerFieldType type) {
- ValidatingCombobox* combobox = static_cast<ValidatingCombobox*>(
- delegate_->dialog_view()->GetViewByID(static_cast<int>(type)));
+ ValidatingCombobox* combobox =
+ static_cast<ValidatingCombobox*>(delegate_->dialog_view()->GetViewByID(
+ EditorViewController::GetInputFieldViewId(type)));
DCHECK(combobox);
return combobox->model()->GetItemAt(combobox->selected_index());
}
@@ -577,8 +581,9 @@ base::string16 PaymentRequestBrowserTestBase::GetComboboxValue(
void PaymentRequestBrowserTestBase::SetComboboxValue(
const base::string16& value,
autofill::ServerFieldType type) {
- ValidatingCombobox* combobox = static_cast<ValidatingCombobox*>(
- delegate_->dialog_view()->GetViewByID(static_cast<int>(type)));
+ ValidatingCombobox* combobox =
+ static_cast<ValidatingCombobox*>(delegate_->dialog_view()->GetViewByID(
+ EditorViewController::GetInputFieldViewId(type)));
DCHECK(combobox);
combobox->SelectValue(value);
combobox->OnContentsChanged();

Powered by Google App Engine
This is Rietveld 408576698