| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_buffer.h" | 5 #include "net/ftp/ftp_directory_listing_buffer.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/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/string_tokenizer.h" | 10 #include "base/string_tokenizer.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "net/ftp/ftp_directory_listing_parsers.h" | 13 #include "net/ftp/ftp_directory_listing_parser.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 TEST(FtpDirectoryListingBufferTest, Parse) { | 18 TEST(FtpDirectoryListingBufferTest, Parse) { |
| 19 const char* test_files[] = { | 19 const char* test_files[] = { |
| 20 "dir-listing-ls-1", | 20 "dir-listing-ls-1", |
| 21 "dir-listing-ls-1-utf8", | 21 "dir-listing-ls-1-utf8", |
| 22 "dir-listing-ls-2", | 22 "dir-listing-ls-2", |
| 23 "dir-listing-ls-3", | 23 "dir-listing-ls-3", |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 EXPECT_EQ(hour, time_exploded.hour); | 111 EXPECT_EQ(hour, time_exploded.hour); |
| 112 EXPECT_EQ(minute, time_exploded.minute); | 112 EXPECT_EQ(minute, time_exploded.minute); |
| 113 EXPECT_EQ(0, time_exploded.second); | 113 EXPECT_EQ(0, time_exploded.second); |
| 114 EXPECT_EQ(0, time_exploded.millisecond); | 114 EXPECT_EQ(0, time_exploded.millisecond); |
| 115 } | 115 } |
| 116 EXPECT_FALSE(buffer.EntryAvailable()); | 116 EXPECT_FALSE(buffer.EntryAvailable()); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace | 120 } // namespace |
| OLD | NEW |