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

Unified Diff: chrome/browser/autofill/form_structure_browsertest.cc

Issue 673923002: Add the identified form section to the autofill tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/test/data/autofill/heuristics/output/00_i18n_de.out » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/form_structure_browsertest.cc
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc
index d12a8de779fe928f16131cac90722a6501916349..53a823c46eaa5919fd11f7767bf00be28101c753 100644
--- a/chrome/browser/autofill/form_structure_browsertest.cc
+++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -76,24 +76,19 @@ void FormStructureBrowserTest::GenerateResults(const std::string& input,
AutofillManager* autofill_manager = autofill_driver->autofill_manager();
ASSERT_NE(static_cast<AutofillManager*>(NULL), autofill_manager);
std::vector<FormStructure*> forms = autofill_manager->form_structures_.get();
- *output = FormStructureBrowserTest::FormStructuresToString(forms);
+ *output = FormStructuresToString(forms);
}
std::string FormStructureBrowserTest::FormStructuresToString(
const std::vector<FormStructure*>& forms) {
std::string forms_string;
- for (std::vector<FormStructure*>::const_iterator iter = forms.begin();
- iter != forms.end();
- ++iter) {
-
- for (std::vector<AutofillField*>::const_iterator field_iter =
- (*iter)->begin();
- field_iter != (*iter)->end();
- ++field_iter) {
- forms_string += (*field_iter)->Type().ToString();
- forms_string += " | " + base::UTF16ToUTF8((*field_iter)->name);
- forms_string += " | " + base::UTF16ToUTF8((*field_iter)->label);
- forms_string += " | " + base::UTF16ToUTF8((*field_iter)->value);
+ for (const FormStructure* form : forms) {
+ for (const AutofillField* field : *form) {
+ forms_string += field->Type().ToString();
+ forms_string += " | " + base::UTF16ToUTF8(field->name);
+ forms_string += " | " + base::UTF16ToUTF8(field->label);
+ forms_string += " | " + base::UTF16ToUTF8(field->value);
+ forms_string += " | " + field->section();
forms_string += "\n";
}
}
« no previous file with comments | « no previous file | chrome/test/data/autofill/heuristics/output/00_i18n_de.out » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698