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

Unified Diff: net/ftp/ftp_directory_listing_parser_unittest.h

Issue 3448029: FTP: fix directory listing parser for ftp.usa.hp.com (Closed)
Patch Set: attempt to fix Windows trybots Created 10 years, 3 months 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
Index: net/ftp/ftp_directory_listing_parser_unittest.h
diff --git a/net/ftp/ftp_directory_listing_parser_unittest.h b/net/ftp/ftp_directory_listing_parser_unittest.h
index c31546e7a2d9f6004b8c42853cb9c869b3a71f77..5f9d6f03f9bcc2251bda9d23afb8be3bb912d549 100644
--- a/net/ftp/ftp_directory_listing_parser_unittest.h
+++ b/net/ftp/ftp_directory_listing_parser_unittest.h
@@ -40,13 +40,23 @@ class FtpDirectoryListingParserTest : public testing::Test {
base::Time::Exploded time_exploded;
entry.last_modified.LocalExplode(&time_exploded);
+
+ // Only test members displayed on the directory listing.
EXPECT_EQ(test_case.year, time_exploded.year);
EXPECT_EQ(test_case.month, time_exploded.month);
EXPECT_EQ(test_case.day_of_month, time_exploded.day_of_month);
EXPECT_EQ(test_case.hour, time_exploded.hour);
EXPECT_EQ(test_case.minute, time_exploded.minute);
- EXPECT_EQ(0, time_exploded.second);
- EXPECT_EQ(0, time_exploded.millisecond);
+ }
+
+ base::Time GetMockCurrentTime() {
+ base::Time::Exploded mock_current_time_exploded = { 0 };
+ mock_current_time_exploded.year = 1994;
+ mock_current_time_exploded.month = 11;
+ mock_current_time_exploded.day_of_month = 15;
+ mock_current_time_exploded.hour = 12;
+ mock_current_time_exploded.minute = 45;
+ return base::Time::FromLocalExploded(mock_current_time_exploded);
}
private:
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_netware_unittest.cc ('k') | net/ftp/ftp_directory_listing_parser_windows_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698