OLD | NEW |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 += (*field_iter)->Type().ToString(); | 93 forms_string += (*field_iter)->Type().ToString(); |
94 forms_string += " | " + UTF16ToUTF8((*field_iter)->name); | 94 forms_string += " | " + base::UTF16ToUTF8((*field_iter)->name); |
95 forms_string += " | " + UTF16ToUTF8((*field_iter)->label); | 95 forms_string += " | " + base::UTF16ToUTF8((*field_iter)->label); |
96 forms_string += " | " + UTF16ToUTF8((*field_iter)->value); | 96 forms_string += " | " + base::UTF16ToUTF8((*field_iter)->value); |
97 forms_string += "\n"; | 97 forms_string += "\n"; |
98 } | 98 } |
99 } | 99 } |
100 return forms_string; | 100 return forms_string; |
101 } | 101 } |
102 | 102 |
103 // Heuristics tests timeout on Windows. See http://crbug.com/85276 | 103 // Heuristics tests timeout on Windows. See http://crbug.com/85276 |
104 // Also on ChromeOS/Aura. See crbug.com/173621 | 104 // Also on ChromeOS/Aura. See crbug.com/173621 |
105 // On Linux too. See crbug.com/323093 | 105 // On Linux too. See crbug.com/323093 |
106 #if defined(OS_WIN) || defined(USE_AURA) || defined(OS_LINUX) | 106 #if defined(OS_WIN) || defined(USE_AURA) || defined(OS_LINUX) |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest, | 271 IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest, |
272 MAYBE_DataDrivenHeuristics(20)) { | 272 MAYBE_DataDrivenHeuristics(20)) { |
273 const base::FilePath::CharType kFileNamePattern[] = | 273 const base::FilePath::CharType kFileNamePattern[] = |
274 FILE_PATH_LITERAL("20_*.html"); | 274 FILE_PATH_LITERAL("20_*.html"); |
275 RunDataDrivenTest(GetInputDirectory(kTestName), | 275 RunDataDrivenTest(GetInputDirectory(kTestName), |
276 GetOutputDirectory(kTestName), | 276 GetOutputDirectory(kTestName), |
277 kFileNamePattern); | 277 kFileNamePattern); |
278 } | 278 } |
279 | 279 |
280 } // namespace autofill | 280 } // namespace autofill |
OLD | NEW |