| 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 "chrome/browser/google_apis/time_util.h" | 5 #include "google_apis/drive/time_util.h" |
| 6 | 6 |
| 7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/time/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 namespace google_apis { | 12 namespace google_apis { |
| 13 namespace util { | 13 namespace util { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 TEST(TimeUtilTest, FormatTimeAsStringLocalTime) { | 87 TEST(TimeUtilTest, FormatTimeAsStringLocalTime) { |
| 88 base::Time::Exploded exploded_time = {2012, 7, 0, 19, 15, 59, 13, 123}; | 88 base::Time::Exploded exploded_time = {2012, 7, 0, 19, 15, 59, 13, 123}; |
| 89 base::Time time = base::Time::FromLocalExploded(exploded_time); | 89 base::Time time = base::Time::FromLocalExploded(exploded_time); |
| 90 EXPECT_EQ("2012-07-19T15:59:13.123", FormatTimeAsStringLocaltime(time)); | 90 EXPECT_EQ("2012-07-19T15:59:13.123", FormatTimeAsStringLocaltime(time)); |
| 91 | 91 |
| 92 EXPECT_EQ("null", FormatTimeAsStringLocaltime(base::Time())); | 92 EXPECT_EQ("null", FormatTimeAsStringLocaltime(base::Time())); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace util | 95 } // namespace util |
| 96 } // namespace google_apis | 96 } // namespace google_apis |
| OLD | NEW |