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

Unified Diff: net/ftp/ftp_directory_listing_buffer_unittest.cc

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
« no previous file with comments | « net/ftp/ftp_directory_listing_buffer.cc ('k') | net/ftp/ftp_directory_listing_parser_hprc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_directory_listing_buffer_unittest.cc
diff --git a/net/ftp/ftp_directory_listing_buffer_unittest.cc b/net/ftp/ftp_directory_listing_buffer_unittest.cc
index ff7aedffb1670c5ee5296939538b887d6aec5ed8..ac6258785707bdcb9a7541b74b33cb4300187a0f 100644
--- a/net/ftp/ftp_directory_listing_buffer_unittest.cc
+++ b/net/ftp/ftp_directory_listing_buffer_unittest.cc
@@ -19,6 +19,9 @@ namespace {
TEST(FtpDirectoryListingBufferTest, Parse) {
const char* test_files[] = {
+ "dir-listing-hprc-1",
+ "dir-listing-hprc-2",
+ "dir-listing-hprc-3",
"dir-listing-ls-1",
"dir-listing-ls-1-utf8",
"dir-listing-ls-2",
@@ -56,9 +59,14 @@ TEST(FtpDirectoryListingBufferTest, Parse) {
test_dir = test_dir.AppendASCII("data");
test_dir = test_dir.AppendASCII("ftp");
- base::Time mock_current_time;
- ASSERT_TRUE(base::Time::FromString(L"Tue, 15 Nov 1994 12:45:26 GMT",
- &mock_current_time));
+ 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;
+ base::Time mock_current_time(
+ base::Time::FromLocalExploded(mock_current_time_exploded));
for (size_t i = 0; i < arraysize(test_files); i++) {
SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s", i, test_files[i]));
@@ -122,8 +130,6 @@ TEST(FtpDirectoryListingBufferTest, Parse) {
EXPECT_EQ(day_of_month, time_exploded.day_of_month);
EXPECT_EQ(hour, time_exploded.hour);
EXPECT_EQ(minute, time_exploded.minute);
- EXPECT_EQ(0, time_exploded.second);
- EXPECT_EQ(0, time_exploded.millisecond);
}
EXPECT_FALSE(buffer.EntryAvailable());
}
« no previous file with comments | « net/ftp/ftp_directory_listing_buffer.cc ('k') | net/ftp/ftp_directory_listing_parser_hprc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698