| OLD | NEW | 
|   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 "base/basictypes.h" |   7 #include "base/basictypes.h" | 
|   8 #include "base/time.h" |   8 #include "base/time.h" | 
|   9 #include "chrome/common/l10n_util.h" |   9 #include "chrome/common/l10n_util.h" | 
|  10 #include "chrome/common/time_format.h" |  10 #include "chrome/common/time_format.h" | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  50   const TimeDelta three_mins = TimeDelta::FromMinutes(3); |  50   const TimeDelta three_mins = TimeDelta::FromMinutes(3); | 
|  51   const TimeDelta one_sec = TimeDelta::FromSeconds(1); |  51   const TimeDelta one_sec = TimeDelta::FromSeconds(1); | 
|  52   const TimeDelta five_secs = TimeDelta::FromSeconds(5); |  52   const TimeDelta five_secs = TimeDelta::FromSeconds(5); | 
|  53   const TimeDelta twohundred_millisecs = TimeDelta::FromMilliseconds(200); |  53   const TimeDelta twohundred_millisecs = TimeDelta::FromMilliseconds(200); | 
|  54  |  54  | 
|  55   // TODO(jungshik) : These test only pass when the OS locale is 'en'. |  55   // TODO(jungshik) : These test only pass when the OS locale is 'en'. | 
|  56   // We need to add SetUp() and TearDown() to set the locale to 'en'. |  56   // We need to add SetUp() and TearDown() to set the locale to 'en'. | 
|  57   TestRemainingTime(twohundred_millisecs, L"0 secs", L"0 secs left"); |  57   TestRemainingTime(twohundred_millisecs, L"0 secs", L"0 secs left"); | 
|  58   TestRemainingTime(one_sec - twohundred_millisecs, L"0 secs", L"0 secs left"); |  58   TestRemainingTime(one_sec - twohundred_millisecs, L"0 secs", L"0 secs left"); | 
|  59   TestRemainingTime(one_sec + twohundred_millisecs, L"1 sec", L"1 sec left"); |  59   TestRemainingTime(one_sec + twohundred_millisecs, L"1 sec", L"1 sec left"); | 
|  60   TestRemainingTime(five_secs + twohundred_millisecs, L"5 secs", L"5 secs left")
    ; |  60   TestRemainingTime(five_secs + twohundred_millisecs, L"5 secs", | 
 |  61                     L"5 secs left"); | 
|  61   TestRemainingTime(one_min + five_secs, L"1 min", L"1 min left"); |  62   TestRemainingTime(one_min + five_secs, L"1 min", L"1 min left"); | 
|  62   TestRemainingTime(three_mins + twohundred_millisecs, |  63   TestRemainingTime(three_mins + twohundred_millisecs, | 
|  63                     L"3 mins", L"3 mins left"); |  64                     L"3 mins", L"3 mins left"); | 
|  64   TestRemainingTime(one_hour + five_secs, L"1 hour", L"1 hour left"); |  65   TestRemainingTime(one_hour + five_secs, L"1 hour", L"1 hour left"); | 
|  65   TestRemainingTime(four_hours + five_secs, L"4 hours", L"4 hours left"); |  66   TestRemainingTime(four_hours + five_secs, L"4 hours", L"4 hours left"); | 
|  66   TestRemainingTime(one_day + five_secs, L"1 day", L"1 day left"); |  67   TestRemainingTime(one_day + five_secs, L"1 day", L"1 day left"); | 
|  67   TestRemainingTime(three_days, L"3 days", L"3 days left"); |  68   TestRemainingTime(three_days, L"3 days", L"3 days left"); | 
|  68   TestRemainingTime(three_days + four_hours, L"3 days", L"3 days left"); |  69   TestRemainingTime(three_days + four_hours, L"3 days", L"3 days left"); | 
|  69 } |  70 } | 
|  70  |  71  | 
| OLD | NEW |