| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <time.h> | 5 #include <time.h> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/third_party/nspr/prtime.h" | 8 #include "base/third_party/nspr/prtime.h" |
| 9 #include "base/time.h" | 9 #include "base/time/time.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 using base::Time; | 12 using base::Time; |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // time_t representation of 15th Oct 2007 12:45:00 PDT | 16 // time_t representation of 15th Oct 2007 12:45:00 PDT |
| 17 PRTime comparison_time_pdt = 1192477500 * Time::kMicrosecondsPerSecond; | 17 PRTime comparison_time_pdt = 1192477500 * Time::kMicrosecondsPerSecond; |
| 18 | 18 |
| 19 // Specialized test fixture allowing time strings without timezones to be | 19 // Specialized test fixture allowing time strings without timezones to be |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 TEST_F(PRTimeTest, ParseTimeTestNotNormalized2) { | 157 TEST_F(PRTimeTest, ParseTimeTestNotNormalized2) { |
| 158 PRTime parsed_time = 0; | 158 PRTime parsed_time = 0; |
| 159 PRStatus result = PR_ParseTimeString("Sun Oct 14 36:45 PDT 2007", | 159 PRStatus result = PR_ParseTimeString("Sun Oct 14 36:45 PDT 2007", |
| 160 PR_FALSE, &parsed_time); | 160 PR_FALSE, &parsed_time); |
| 161 EXPECT_EQ(PR_SUCCESS, result); | 161 EXPECT_EQ(PR_SUCCESS, result); |
| 162 EXPECT_EQ(comparison_time_pdt, parsed_time); | 162 EXPECT_EQ(comparison_time_pdt, parsed_time); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace | 165 } // namespace |
| OLD | NEW |