summaryrefslogtreecommitdiffstats
path: root/chrome/common/l10n_util_unittest.cc
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 02:55:12 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 02:55:12 +0000
commitd2d3d13f590b1cea6013621706f260566945cb21 (patch)
tree318c9e583e44e5ab144843e230ff3b47d31d4f72 /chrome/common/l10n_util_unittest.cc
parent3be3dc9eef11feec71b5d88c8f5a7061cbf47724 (diff)
downloadchromium_src-d2d3d13f590b1cea6013621706f260566945cb21.zip
chromium_src-d2d3d13f590b1cea6013621706f260566945cb21.tar.gz
chromium_src-d2d3d13f590b1cea6013621706f260566945cb21.tar.bz2
Reverting 7574 which reverted 7570. It was an error on my part.
Review URL: http://codereview.chromium.org/16529 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/l10n_util_unittest.cc')
-rw-r--r--chrome/common/l10n_util_unittest.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/common/l10n_util_unittest.cc b/chrome/common/l10n_util_unittest.cc
index ee14f23..18cb8f0 100644
--- a/chrome/common/l10n_util_unittest.cc
+++ b/chrome/common/l10n_util_unittest.cc
@@ -2,21 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "build/build_config.h"
+
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/l10n_util.h"
+#if !defined(OS_MACOSX)
#include "chrome/test/data/resource.h"
+#endif
#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
#include "unicode/locid.h"
namespace {
-class L10nUtilTest: public testing::Test {
+class L10nUtilTest: public PlatformTest {
};
-TEST(L10nUtilTest, GetString) {
+#if defined(OS_WIN)
+TEST_F(L10nUtilTest, GetString) {
std::wstring s = l10n_util::GetString(IDS_SIMPLE);
EXPECT_EQ(std::wstring(L"Hello World!"), s);
@@ -26,8 +32,9 @@ TEST(L10nUtilTest, GetString) {
s = l10n_util::GetStringF(IDS_PLACEHOLDERS_2, 20);
EXPECT_EQ(std::wstring(L"You owe me $20."), s);
}
+#endif // defined(OS_WIN)
-TEST(L10nUtilTest, TruncateString) {
+TEST_F(L10nUtilTest, TruncateString) {
std::wstring string(L"foooooey bxxxar baz");
// Make sure it doesn't modify the string if length > string length.
@@ -61,7 +68,7 @@ void SetICUDefaultLocale(const std::wstring& locale_string) {
EXPECT_TRUE(U_SUCCESS(error_code));
}
-TEST(L10nUtilTest, GetAppLocale) {
+TEST_F(L10nUtilTest, GetAppLocale) {
// Use a temporary locale dir so we don't have to actually build the locale
// dlls for this test.
std::wstring orig_locale_dir;