| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_ | 5 #ifndef NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_ |
| 6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_ | 6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 11 #include "net/ftp/ftp_directory_listing_parser.h" | 13 #include "net/ftp/ftp_directory_listing_parser.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 15 |
| 14 namespace net { | 16 namespace net { |
| 15 | 17 |
| 16 class FtpDirectoryListingParserTest : public testing::Test { | 18 class FtpDirectoryListingParserTest : public testing::Test { |
| 17 public: | 19 public: |
| 18 struct SingleLineTestData { | 20 struct SingleLineTestData { |
| 19 const char* input; | 21 const char* input; |
| 20 FtpDirectoryListingEntry::Type type; | 22 FtpDirectoryListingEntry::Type type; |
| 21 const char* filename; | 23 const char* filename; |
| 22 int64 size; | 24 int64_t size; |
| 23 int year; | 25 int year; |
| 24 int month; | 26 int month; |
| 25 int day_of_month; | 27 int day_of_month; |
| 26 int hour; | 28 int hour; |
| 27 int minute; | 29 int minute; |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 protected: | 32 protected: |
| 31 FtpDirectoryListingParserTest() {} | 33 FtpDirectoryListingParserTest() {} |
| 32 | 34 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 mock_current_time_exploded.hour = 12; | 69 mock_current_time_exploded.hour = 12; |
| 68 mock_current_time_exploded.minute = 45; | 70 mock_current_time_exploded.minute = 45; |
| 69 return base::Time::FromLocalExploded(mock_current_time_exploded); | 71 return base::Time::FromLocalExploded(mock_current_time_exploded); |
| 70 } | 72 } |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace net | 75 } // namespace net |
| 74 | 76 |
| 75 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_ | 77 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_ |
| 76 | 78 |
| OLD | NEW |