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

Unified Diff: base/i18n/timezone_unittest.cc

Issue 26315008: Add a timezone utility file to base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/i18n/timezone.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/timezone_unittest.cc
diff --git a/base/i18n/timezone_unittest.cc b/base/i18n/timezone_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4123bbf409c816c1ec1f256ae3cc4585e358cdd4
--- /dev/null
+++ b/base/i18n/timezone_unittest.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/i18n/timezone.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+namespace {
+
+#if defined(OS_ANDROID)
+// icu's timezone utility doesn't work on Android.
+#define MAYBE_CountryCodeForCurrentTimezone DISABLED_CountryCodeForCurrentTimezone
+#else
+#define MAYBE_CountryCodeForCurrentTimezone CountryCodeForCurrentTimezone
+#endif
+
+TEST(TimezoneTest, MAYBE_CountryCodeForCurrentTimezone) {
+ std::string country_code = CountryCodeForCurrentTimezone();
+ EXPECT_EQ(2U, country_code.size());
+}
+
+} // namespace
+} // namespace base
« no previous file with comments | « base/i18n/timezone.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698