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

Unified Diff: net/ftp/ftp_directory_listing_parser_ls_unittest.cc

Issue 472003: Compatibility updates for "ls -l" style FTP LIST response parser: (Closed)
Patch Set: fix a bug Created 11 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_ls.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_directory_listing_parser_ls_unittest.cc
diff --git a/net/ftp/ftp_directory_listing_parser_ls_unittest.cc b/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
index 4107f9fb635780e11bc980b7a312a4c52636bb2b..ad7edc1571eccc786d4161c04a30d5d4280fa480 100644
--- a/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
+++ b/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
@@ -40,6 +40,9 @@ TEST_F(FtpDirectoryListingParserLsTest, Good) {
{ "-rw-r--r-- 1 2 3 3447432 May 18 2009 Foo - Manual.pdf",
net::FtpDirectoryListingEntry::FILE, "Foo - Manual.pdf", 3447432,
2009, 5, 18, 0, 0 },
+ { "d-wx-wx-wt+ 4 ftp 989 512 Dec 8 15:54 incoming",
+ net::FtpDirectoryListingEntry::DIRECTORY, "incoming", -1,
+ now_exploded.year, 12, 8, 15, 54 },
// Tests for the wu-ftpd variant:
{ "drwxr-xr-x 2 sys 512 Mar 27 2009 pub",
@@ -92,6 +95,10 @@ TEST_F(FtpDirectoryListingParserLsTest, Bad) {
"-rw-r--r-- 1 ftp ftp -528 Nov 01 2007 README",
"-rw-r--r-- 1 ftp ftp 528 Foo 01 2007 README",
+ "d-wx-wx-wt++ 4 ftp 989 512 Dec 8 15:54 incoming",
+ "d-wx-wx-wt$ 4 ftp 989 512 Dec 8 15:54 incoming",
+ "-qqqqqqqqq+ 2 sys 512 Mar 27 2009 pub",
+
// Tests important for security: verify that after we detect the column
// offset we don't try to access invalid memory on malformed input.
"drwxr-xr-x 3 ftp ftp 4096 May 15 18:11",
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_ls.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698