| 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 #include "ui/base/l10n/time_format.h" | 5 #include "ui/base/l10n/time_format.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/base/l10n/formatter.h" | 12 #include "ui/base/l10n/formatter.h" |
| 13 #include "ui/base/resource/resource_bundle.h" | |
| 14 | 13 |
| 15 using base::ASCIIToUTF16; | 14 using base::ASCIIToUTF16; |
| 16 | 15 |
| 17 namespace ui { | 16 namespace ui { |
| 18 namespace { | 17 namespace { |
| 19 | 18 |
| 20 using base::TimeDelta; | 19 using base::TimeDelta; |
| 21 | 20 |
| 22 class TimeFormatTest : public ::testing::Test { | 21 class TimeFormatTest : public ::testing::Test { |
| 23 public: | 22 public: |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 TimeFormat::RelativeDate(two_days_ago, NULL); | 343 TimeFormat::RelativeDate(two_days_ago, NULL); |
| 345 EXPECT_TRUE(two_days_ago_str.empty()); | 344 EXPECT_TRUE(two_days_ago_str.empty()); |
| 346 | 345 |
| 347 base::Time a_week_ago = now - TimeDelta::FromDays(7); | 346 base::Time a_week_ago = now - TimeDelta::FromDays(7); |
| 348 base::string16 a_week_ago_str = TimeFormat::RelativeDate(a_week_ago, NULL); | 347 base::string16 a_week_ago_str = TimeFormat::RelativeDate(a_week_ago, NULL); |
| 349 EXPECT_TRUE(a_week_ago_str.empty()); | 348 EXPECT_TRUE(a_week_ago_str.empty()); |
| 350 } | 349 } |
| 351 | 350 |
| 352 } // namespace | 351 } // namespace |
| 353 } // namespace ui | 352 } // namespace ui |
| OLD | NEW |