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

Side by Side Diff: chrome/browser/autofill/form_structure_browsertest.cc

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser test Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/autofill_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 const std::vector<FormStructure*>& forms) { 83 const std::vector<FormStructure*>& forms) {
84 std::string forms_string; 84 std::string forms_string;
85 for (std::vector<FormStructure*>::const_iterator iter = forms.begin(); 85 for (std::vector<FormStructure*>::const_iterator iter = forms.begin();
86 iter != forms.end(); 86 iter != forms.end();
87 ++iter) { 87 ++iter) {
88 88
89 for (std::vector<AutofillField*>::const_iterator field_iter = 89 for (std::vector<AutofillField*>::const_iterator field_iter =
90 (*iter)->begin(); 90 (*iter)->begin();
91 field_iter != (*iter)->end(); 91 field_iter != (*iter)->end();
92 ++field_iter) { 92 ++field_iter) {
93 forms_string += 93 forms_string += (*field_iter)->Type().ToString();
94 AutofillType::FieldTypeToString((*field_iter)->Type().server_type());
95 forms_string += " | " + UTF16ToUTF8((*field_iter)->name); 94 forms_string += " | " + UTF16ToUTF8((*field_iter)->name);
96 forms_string += " | " + UTF16ToUTF8((*field_iter)->label); 95 forms_string += " | " + UTF16ToUTF8((*field_iter)->label);
97 forms_string += " | " + UTF16ToUTF8((*field_iter)->value); 96 forms_string += " | " + UTF16ToUTF8((*field_iter)->value);
98 forms_string += "\n"; 97 forms_string += "\n";
99 } 98 }
100 } 99 }
101 return forms_string; 100 return forms_string;
102 } 101 }
103 102
104 // Heuristics tests timeout on Windows. See http://crbug.com/85276 103 // Heuristics tests timeout on Windows. See http://crbug.com/85276
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest, 270 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest,
272 MAYBE_DataDrivenHeuristics(20)) { 271 MAYBE_DataDrivenHeuristics(20)) {
273 const base::FilePath::CharType kFileNamePattern[] = 272 const base::FilePath::CharType kFileNamePattern[] =
274 FILE_PATH_LITERAL("20_*.html"); 273 FILE_PATH_LITERAL("20_*.html");
275 RunDataDrivenTest(GetInputDirectory(kTestName), 274 RunDataDrivenTest(GetInputDirectory(kTestName),
276 GetOutputDirectory(kTestName), 275 GetOutputDirectory(kTestName),
277 kFileNamePattern); 276 kFileNamePattern);
278 } 277 }
279 278
280 } // namespace autofill 279 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/autofill_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698