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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_dialog_view_tester_cocoa.mm

Issue 162813004: [OSX, rAC] Fix helpers to match Views behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_section_container.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/autofill/autofill_dialog_view_tester_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_view_tester_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_view_tester_cocoa.mm
index f0cb92785e3cbeccd33773bdbc9d39db77c251ee..ad66cf9e417f1db93ed951966d9273245857679d 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_view_tester_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_view_tester_cocoa.mm
@@ -32,6 +32,8 @@
forType:(autofill::ServerFieldType)type {
for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) {
autofill::DialogSection section = static_cast<autofill::DialogSection>(i);
+ if (!dialog_->delegate()->SectionIsActive(section))
+ continue;
// TODO(groby): Need to find the section for an input directly - wasteful.
[[mainContainer_ sectionForId:section] setFieldValue:text forType:type];
}
@@ -45,6 +47,8 @@
- (void)activateFieldForType:(autofill::ServerFieldType)type {
for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) {
autofill::DialogSection section = static_cast<autofill::DialogSection>(i);
+ if (!dialog_->delegate()->SectionIsActive(section))
+ continue;
[[mainContainer_ sectionForId:section] activateFieldForType:type];
}
}
@@ -86,6 +90,8 @@ base::string16 AutofillDialogViewTesterCocoa::GetTextContentsOfInput(
ServerFieldType type) {
for (size_t i = SECTION_MIN; i <= SECTION_MAX; ++i) {
DialogSection section = static_cast<DialogSection>(i);
+ if (!dialog_->delegate()->SectionIsActive(section))
+ continue;
FieldValueMap contents;
[controller() getInputs:&contents forSection:section];
FieldValueMap::const_iterator it = contents.find(type);
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_section_container.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698