| 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/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_tokenizer.h" | 9 #include "base/string_tokenizer.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 12 #include "net/ftp/ftp_directory_listing_parsers.h" | 12 #include "net/ftp/ftp_directory_listing_parsers.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 TEST(FtpDirectoryListingBufferTest, Parse) { | 17 TEST(FtpDirectoryListingBufferTest, Parse) { |
| 18 const char* test_files[] = { | 18 const char* test_files[] = { |
| 19 "dir-listing-ls-1", | 19 "dir-listing-ls-1", |
| 20 "dir-listing-ls-1-utf8", |
| 20 "dir-listing-ls-2", | 21 "dir-listing-ls-2", |
| 21 "dir-listing-vms-1", | 22 "dir-listing-vms-1", |
| 22 "dir-listing-vms-2", | 23 "dir-listing-vms-2", |
| 23 "dir-listing-vms-3", | 24 "dir-listing-vms-3", |
| 24 "dir-listing-vms-4", | 25 "dir-listing-vms-4", |
| 25 }; | 26 }; |
| 26 | 27 |
| 27 FilePath test_dir; | 28 FilePath test_dir; |
| 28 PathService::Get(base::DIR_SOURCE_ROOT, &test_dir); | 29 PathService::Get(base::DIR_SOURCE_ROOT, &test_dir); |
| 29 test_dir = test_dir.AppendASCII("net"); | 30 test_dir = test_dir.AppendASCII("net"); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 EXPECT_EQ(hour, time_exploded.hour); | 99 EXPECT_EQ(hour, time_exploded.hour); |
| 99 EXPECT_EQ(minute, time_exploded.minute); | 100 EXPECT_EQ(minute, time_exploded.minute); |
| 100 EXPECT_EQ(0, time_exploded.second); | 101 EXPECT_EQ(0, time_exploded.second); |
| 101 EXPECT_EQ(0, time_exploded.millisecond); | 102 EXPECT_EQ(0, time_exploded.millisecond); |
| 102 } | 103 } |
| 103 EXPECT_FALSE(buffer.EntryAvailable()); | 104 EXPECT_FALSE(buffer.EntryAvailable()); |
| 104 } | 105 } |
| 105 } | 106 } |
| 106 | 107 |
| 107 } // namespace | 108 } // namespace |
| OLD | NEW |