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

Side by Side Diff: chrome/browser/google_apis/time_util_unittest.cc

Issue 16561007: Use a direct include of utf_string_conversions.h in chrome/browser/, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
OLDNEW
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 "chrome/browser/google_apis/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/time.h" 9 #include "base/time.h"
9 #include "base/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 #if defined(OS_CHROMEOS) 12 #if defined(OS_CHROMEOS)
13 #include "chrome/browser/chromeos/system/timezone_settings.h" 13 #include "chrome/browser/chromeos/system/timezone_settings.h"
14 #endif // OS_CHROMEOS 14 #endif // OS_CHROMEOS
15 15
16 namespace google_apis { 16 namespace google_apis {
17 namespace util { 17 namespace util {
18 namespace { 18 namespace {
19 19
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 TEST(TimeUtilTest, FormatTimeAsStringLocalTime) { 108 TEST(TimeUtilTest, FormatTimeAsStringLocalTime) {
109 base::Time::Exploded exploded_time = {2012, 7, 0, 19, 15, 59, 13, 123}; 109 base::Time::Exploded exploded_time = {2012, 7, 0, 19, 15, 59, 13, 123};
110 base::Time time = base::Time::FromLocalExploded(exploded_time); 110 base::Time time = base::Time::FromLocalExploded(exploded_time);
111 EXPECT_EQ("2012-07-19T15:59:13.123", FormatTimeAsStringLocaltime(time)); 111 EXPECT_EQ("2012-07-19T15:59:13.123", FormatTimeAsStringLocaltime(time));
112 112
113 EXPECT_EQ("null", FormatTimeAsStringLocaltime(base::Time())); 113 EXPECT_EQ("null", FormatTimeAsStringLocaltime(base::Time()));
114 } 114 }
115 115
116 } // namespace util 116 } // namespace util
117 } // namespace google_apis 117 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698