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 "net/ftp/ftp_directory_listing_parser.h" | 5 #include "net/ftp/ftp_directory_listing_parser.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 {"dir-listing-ls-25", OK}, // UTF-8 | 151 {"dir-listing-ls-25", OK}, // UTF-8 |
152 {"dir-listing-ls-26", OK}, // KOI8-R | 152 {"dir-listing-ls-26", OK}, // KOI8-R |
153 {"dir-listing-ls-27", OK}, // windows-1251 | 153 {"dir-listing-ls-27", OK}, // windows-1251 |
154 | 154 |
155 {"dir-listing-ls-28", OK}, // Hylafax FTP server | 155 {"dir-listing-ls-28", OK}, // Hylafax FTP server |
156 {"dir-listing-ls-29", OK}, | 156 {"dir-listing-ls-29", OK}, |
157 {"dir-listing-ls-30", OK}, | 157 {"dir-listing-ls-30", OK}, |
158 {"dir-listing-ls-31", OK}, | 158 {"dir-listing-ls-31", OK}, |
159 {"dir-listing-ls-32", OK}, // busybox | 159 {"dir-listing-ls-32", OK}, // busybox |
160 {"dir-listing-ls-33", OK}, | 160 {"dir-listing-ls-33", OK}, |
| 161 {"dir-listing-ls-34", OK}, // Broken encoding. Should not fail. |
161 | 162 |
162 {"dir-listing-netware-1", OK}, | 163 {"dir-listing-netware-1", OK}, |
163 {"dir-listing-netware-2", OK}, | 164 {"dir-listing-netware-2", OK}, |
164 {"dir-listing-netware-3", OK}, | 165 {"dir-listing-netware-3", OK}, |
165 {"dir-listing-os2-1", ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT}, | 166 {"dir-listing-os2-1", ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT}, |
166 {"dir-listing-vms-1", OK}, | 167 {"dir-listing-vms-1", OK}, |
167 {"dir-listing-vms-2", OK}, | 168 {"dir-listing-vms-2", OK}, |
168 {"dir-listing-vms-3", OK}, | 169 {"dir-listing-vms-3", OK}, |
169 {"dir-listing-vms-4", OK}, | 170 {"dir-listing-vms-4", OK}, |
170 {"dir-listing-vms-5", OK}, | 171 {"dir-listing-vms-5", OK}, |
171 {"dir-listing-vms-6", OK}, | 172 {"dir-listing-vms-6", OK}, |
172 {"dir-listing-vms-7", OK}, | 173 {"dir-listing-vms-7", OK}, |
173 {"dir-listing-vms-8", OK}, | 174 {"dir-listing-vms-8", OK}, |
174 {"dir-listing-windows-1", OK}, | 175 {"dir-listing-windows-1", OK}, |
175 {"dir-listing-windows-2", OK}, | 176 {"dir-listing-windows-2", OK}, |
176 }; | 177 }; |
177 | 178 |
178 INSTANTIATE_TEST_CASE_P(, | 179 INSTANTIATE_TEST_CASE_P(, |
179 FtpDirectoryListingParserTest, | 180 FtpDirectoryListingParserTest, |
180 testing::ValuesIn(kTestParams), | 181 testing::ValuesIn(kTestParams), |
181 TestName); | 182 TestName); |
182 | 183 |
183 } // namespace | 184 } // namespace |
184 | 185 |
185 } // namespace net | 186 } // namespace net |
OLD | NEW |