summaryrefslogtreecommitdiff
path: root/chromium/base/i18n/timezone_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/i18n/timezone_unittest.cc')
-rw-r--r--chromium/base/i18n/timezone_unittest.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/chromium/base/i18n/timezone_unittest.cc b/chromium/base/i18n/timezone_unittest.cc
new file mode 100644
index 00000000000..2cdcc422985
--- /dev/null
+++ b/chromium/base/i18n/timezone_unittest.cc
@@ -0,0 +1,21 @@
+// Copyright 2013 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 {
+
+TEST(TimezoneTest, CountryCodeForCurrentTimezone) {
+ std::string country_code = CountryCodeForCurrentTimezone();
+ // On some systems (such as Android or some flavors of Linux), icu may come up
+ // empty.
+ if (!country_code.empty())
+ EXPECT_EQ(2U, country_code.size());
+}
+
+} // namespace
+} // namespace base