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

Side by Side Diff: net/ftp/ftp_directory_listing_parser_unittest.h

Issue 2090713003: Make callers of FromUTC(Local)Exploded in net/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years 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 unified diff | Download patch
OLDNEW
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> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 EXPECT_EQ(1U, entries.size()); 61 EXPECT_EQ(1U, entries.size());
62 } 62 }
63 63
64 base::Time GetMockCurrentTime() { 64 base::Time GetMockCurrentTime() {
65 base::Time::Exploded mock_current_time_exploded = { 0 }; 65 base::Time::Exploded mock_current_time_exploded = { 0 };
66 mock_current_time_exploded.year = 1994; 66 mock_current_time_exploded.year = 1994;
67 mock_current_time_exploded.month = 11; 67 mock_current_time_exploded.month = 11;
68 mock_current_time_exploded.day_of_month = 15; 68 mock_current_time_exploded.day_of_month = 15;
69 mock_current_time_exploded.hour = 12; 69 mock_current_time_exploded.hour = 12;
70 mock_current_time_exploded.minute = 45; 70 mock_current_time_exploded.minute = 45;
71 return base::Time::FromUTCExploded(mock_current_time_exploded); 71
72 base::Time out_time;
73 EXPECT_TRUE(
74 base::Time::FromUTCExploded(mock_current_time_exploded, &out_time));
75 return out_time;
72 } 76 }
73 }; 77 };
74 78
75 } // namespace net 79 } // namespace net
76 80
77 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_ 81 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698