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

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

Issue 22009003: [Autofill] Distinguish between native field types and potentially HTML field types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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 += AutofillType::FieldTypeToString((*field_iter)->type()); 93 forms_string +=
94 AutofillType::FieldTypeToString((*field_iter)->Type().server_type());
94 forms_string += " | " + UTF16ToUTF8((*field_iter)->name); 95 forms_string += " | " + UTF16ToUTF8((*field_iter)->name);
95 forms_string += " | " + UTF16ToUTF8((*field_iter)->label); 96 forms_string += " | " + UTF16ToUTF8((*field_iter)->label);
96 forms_string += " | " + UTF16ToUTF8((*field_iter)->value); 97 forms_string += " | " + UTF16ToUTF8((*field_iter)->value);
97 forms_string += "\n"; 98 forms_string += "\n";
98 } 99 }
99 } 100 }
100 return forms_string; 101 return forms_string;
101 } 102 }
102 103
103 // Heuristics tests timeout on Windows. See http://crbug.com/85276 104 // Heuristics tests timeout on Windows. See http://crbug.com/85276
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest, 271 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest,
271 MAYBE_DataDrivenHeuristics(20)) { 272 MAYBE_DataDrivenHeuristics(20)) {
272 const base::FilePath::CharType kFileNamePattern[] = 273 const base::FilePath::CharType kFileNamePattern[] =
273 FILE_PATH_LITERAL("20_*.html"); 274 FILE_PATH_LITERAL("20_*.html");
274 RunDataDrivenTest(GetInputDirectory(kTestName), 275 RunDataDrivenTest(GetInputDirectory(kTestName),
275 GetOutputDirectory(kTestName), 276 GetOutputDirectory(kTestName),
276 kFileNamePattern); 277 kFileNamePattern);
277 } 278 }
278 279
279 } // namespace autofill 280 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698