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 "net/ftp/ftp_directory_listing_parser_unittest.h" | 5 #include "net/ftp/ftp_directory_listing_parser_unittest.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "net/ftp/ftp_directory_listing_parser_windows.h" | 10 #include "net/ftp/ftp_directory_listing_parser_windows.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 2001, 1, 6, 2, 42 }, | 31 2001, 1, 6, 2, 42 }, |
32 { "01-06-00 02:42AM 458 Corner1.txt", | 32 { "01-06-00 02:42AM 458 Corner1.txt", |
33 FtpDirectoryListingEntry::FILE, "Corner1.txt", 458, | 33 FtpDirectoryListingEntry::FILE, "Corner1.txt", 458, |
34 2000, 1, 6, 2, 42 }, | 34 2000, 1, 6, 2, 42 }, |
35 { "01-06-99 02:42AM 458 Corner2.txt", | 35 { "01-06-99 02:42AM 458 Corner2.txt", |
36 FtpDirectoryListingEntry::FILE, "Corner2.txt", 458, | 36 FtpDirectoryListingEntry::FILE, "Corner2.txt", 458, |
37 1999, 1, 6, 2, 42 }, | 37 1999, 1, 6, 2, 42 }, |
38 { "01-06-80 02:42AM 458 Corner3.txt", | 38 { "01-06-80 02:42AM 458 Corner3.txt", |
39 FtpDirectoryListingEntry::FILE, "Corner3.txt", 458, | 39 FtpDirectoryListingEntry::FILE, "Corner3.txt", 458, |
40 1980, 1, 6, 2, 42 }, | 40 1980, 1, 6, 2, 42 }, |
41 #if !defined(OS_LINUX) | 41 #if !defined(OS_LINUX) && !defined(OS_ANDROID) |
42 // TODO(phajdan.jr): Re-enable when 2038-year problem is fixed on Linux. | 42 // TODO(phajdan.jr): Re-enable when 2038-year problem is fixed on Linux. |
43 { "01-06-79 02:42AM 458 Corner4", | 43 { "01-06-79 02:42AM 458 Corner4", |
44 FtpDirectoryListingEntry::FILE, "Corner4", 458, | 44 FtpDirectoryListingEntry::FILE, "Corner4", 458, |
45 2079, 1, 6, 2, 42 }, | 45 2079, 1, 6, 2, 42 }, |
46 #endif // !defined (OS_LINUX) | 46 #endif // !defined (OS_LINUX) && !defined(OS_ANDROID) |
47 { "01-06-1979 02:42AM 458 Readme.txt", | 47 { "01-06-1979 02:42AM 458 Readme.txt", |
48 FtpDirectoryListingEntry::FILE, "Readme.txt", 458, | 48 FtpDirectoryListingEntry::FILE, "Readme.txt", 458, |
49 1979, 1, 6, 2, 42 }, | 49 1979, 1, 6, 2, 42 }, |
50 { "11-02-09 05:32PM <DIR> My Directory", | 50 { "11-02-09 05:32PM <DIR> My Directory", |
51 FtpDirectoryListingEntry::DIRECTORY, "My Directory", -1, | 51 FtpDirectoryListingEntry::DIRECTORY, "My Directory", -1, |
52 2009, 11, 2, 17, 32 }, | 52 2009, 11, 2, 17, 32 }, |
53 { "12-25-10 12:00AM <DIR> Christmas Midnight", | 53 { "12-25-10 12:00AM <DIR> Christmas Midnight", |
54 FtpDirectoryListingEntry::DIRECTORY, "Christmas Midnight", -1, | 54 FtpDirectoryListingEntry::DIRECTORY, "Christmas Midnight", -1, |
55 2010, 12, 25, 0, 0 }, | 55 2010, 12, 25, 0, 0 }, |
56 { "12-25-10 12:00PM <DIR> Christmas Midday", | 56 { "12-25-10 12:00PM <DIR> Christmas Midday", |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 std::vector<FtpDirectoryListingEntry> entries; | 117 std::vector<FtpDirectoryListingEntry> entries; |
118 EXPECT_FALSE(ParseFtpDirectoryListingWindows( | 118 EXPECT_FALSE(ParseFtpDirectoryListingWindows( |
119 GetSingleLineTestCase(bad_cases[i]), | 119 GetSingleLineTestCase(bad_cases[i]), |
120 &entries)); | 120 &entries)); |
121 } | 121 } |
122 } | 122 } |
123 | 123 |
124 } // namespace | 124 } // namespace |
125 | 125 |
126 } // namespace net | 126 } // namespace net |
OLD | NEW |