From a8b10e4972af7f75c59112c9f075c011a9c52f34 Mon Sep 17 00:00:00 2001 From: "tc@google.com" Date: Fri, 27 Feb 2009 00:14:21 +0000 Subject: Fix GetAppLocale that is failing on posix. .dll change to .pak. TBR to get the tree green. Review URL: http://codereview.chromium.org/28236 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10541 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/l10n_util_unittest.cc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'chrome') diff --git a/chrome/common/l10n_util_unittest.cc b/chrome/common/l10n_util_unittest.cc index b308ffa4..bf94012 100644 --- a/chrome/common/l10n_util_unittest.cc +++ b/chrome/common/l10n_util_unittest.cc @@ -94,20 +94,27 @@ TEST_F(L10nUtilTest, GetAppLocale) { PathService::Override(chrome::DIR_LOCALES, new_locale_dir); // Make fake locale files. const wchar_t* filenames[] = { - L"en-US.dll", - L"en-GB.dll", - L"fr.dll", - L"es-419.dll", - L"es.dll", - L"zh-TW.dll", - L"zh-CN.dll", - L"he.dll", - L"fil.dll", - L"nb.dll", + L"en-US", + L"en-GB", + L"fr", + L"es-419", + L"es", + L"zh-TW", + L"zh-CN", + L"he", + L"fil", + L"nb", }; + +#if defined(OS_WIN) + static const wchar_t kLocaleFileExtension[] = L".dll"; +#elif defined(OS_POSIX) + static const wchar_t kLocaleFileExtension[] = L".pak"; +#endif for (size_t i = 0; i < arraysize(filenames); ++i) { std::wstring filename = new_locale_dir; file_util::AppendToPath(&filename, filenames[i]); + filename += kLocaleFileExtension; file_util::WriteFile(filename, "", 0); } -- cgit v1.1