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

Side by Side Diff: chrome/common/time_format_unittest.cc

Issue 109043: Move l10n_util to app/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/time_format.cc ('k') | chrome/common/win_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/l10n_util.h"
7 #include "base/basictypes.h" 8 #include "base/basictypes.h"
8 #include "base/time.h" 9 #include "base/time.h"
9 #include "chrome/common/l10n_util.h"
10 #include "chrome/common/time_format.h" 10 #include "chrome/common/time_format.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 using base::Time; 13 using base::Time;
14 using base::TimeDelta; 14 using base::TimeDelta;
15 15
16 TEST(TimeFormat, RelativeDate) { 16 TEST(TimeFormat, RelativeDate) {
17 Time now = Time::Now(); 17 Time now = Time::Now();
18 std::wstring today_str = TimeFormat::RelativeDate(now, NULL); 18 std::wstring today_str = TimeFormat::RelativeDate(now, NULL);
19 EXPECT_EQ(L"Today", today_str); 19 EXPECT_EQ(L"Today", today_str);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 TestTimeFormats(one_sec + twohundred_millisecs, L"1 sec"); 60 TestTimeFormats(one_sec + twohundred_millisecs, L"1 sec");
61 TestTimeFormats(five_secs + twohundred_millisecs, L"5 secs"); 61 TestTimeFormats(five_secs + twohundred_millisecs, L"5 secs");
62 TestTimeFormats(one_min + five_secs, L"1 min"); 62 TestTimeFormats(one_min + five_secs, L"1 min");
63 TestTimeFormats(three_mins + twohundred_millisecs, L"3 mins"); 63 TestTimeFormats(three_mins + twohundred_millisecs, L"3 mins");
64 TestTimeFormats(one_hour + five_secs, L"1 hour"); 64 TestTimeFormats(one_hour + five_secs, L"1 hour");
65 TestTimeFormats(four_hours + five_secs, L"4 hours"); 65 TestTimeFormats(four_hours + five_secs, L"4 hours");
66 TestTimeFormats(one_day + five_secs, L"1 day"); 66 TestTimeFormats(one_day + five_secs, L"1 day");
67 TestTimeFormats(three_days, L"3 days"); 67 TestTimeFormats(three_days, L"3 days");
68 TestTimeFormats(three_days + four_hours, L"3 days"); 68 TestTimeFormats(three_days + four_hours, L"3 days");
69 } 69 }
OLDNEW
« no previous file with comments | « chrome/common/time_format.cc ('k') | chrome/common/win_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698