OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/autofill/autofill_manager.h" | 10 #include "chrome/browser/autofill/autofill_manager.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 const std::vector<FormStructure*>& forms) { | 70 const std::vector<FormStructure*>& forms) { |
71 std::string forms_string; | 71 std::string forms_string; |
72 for (std::vector<FormStructure*>::const_iterator iter = forms.begin(); | 72 for (std::vector<FormStructure*>::const_iterator iter = forms.begin(); |
73 iter != forms.end(); | 73 iter != forms.end(); |
74 ++iter) { | 74 ++iter) { |
75 | 75 |
76 for (std::vector<AutofillField*>::const_iterator field_iter = | 76 for (std::vector<AutofillField*>::const_iterator field_iter = |
77 (*iter)->begin(); | 77 (*iter)->begin(); |
78 field_iter != (*iter)->end(); | 78 field_iter != (*iter)->end(); |
79 ++field_iter) { | 79 ++field_iter) { |
80 forms_string += UTF16ToUTF8((*field_iter)->label); | |
81 forms_string += "|"; | |
82 forms_string += UTF16ToUTF8((*field_iter)->name); | |
83 forms_string += "|"; | |
84 forms_string += UTF16ToUTF8((*field_iter)->value); | |
85 forms_string += "|"; | |
86 forms_string += UTF16ToUTF8((*field_iter)->form_control_type); | |
87 forms_string += "|"; | |
Ilya Sherman
2011/05/25 03:52:02
Did you intentionally to leave these in, or was th
dhollowa
2011/05/25 15:29:47
Debugging.
On 2011/05/25 03:52:02, Ilya Sherman w
| |
80 forms_string += AutofillType::FieldTypeToString((*field_iter)->type()); | 88 forms_string += AutofillType::FieldTypeToString((*field_iter)->type()); |
81 forms_string += "\n"; | 89 forms_string += "\n"; |
82 } | 90 } |
83 } | 91 } |
84 return forms_string; | 92 return forms_string; |
85 } | 93 } |
86 | 94 |
87 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest, DataDrivenHeuristics) { | 95 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest, DataDrivenHeuristics) { |
88 RunDataDrivenTest(GetInputDirectory(kTestName), | 96 RunDataDrivenTest(GetInputDirectory(kTestName), |
89 GetOutputDirectory(kTestName), | 97 GetOutputDirectory(kTestName), |
90 kFileNamePattern); | 98 kFileNamePattern); |
91 } | 99 } |
OLD | NEW |