summaryrefslogtreecommitdiffstats
path: root/chromium/base/files/file_path_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/files/file_path_unittest.cc')
-rw-r--r--chromium/base/files/file_path_unittest.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chromium/base/files/file_path_unittest.cc b/chromium/base/files/file_path_unittest.cc
index 60eaa8f002f..bc0e8432e0e 100644
--- a/chromium/base/files/file_path_unittest.cc
+++ b/chromium/base/files/file_path_unittest.cc
@@ -10,6 +10,10 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+#if defined(OS_POSIX)
+#include "base/test/scoped_locale.h"
+#endif
+
// This macro helps avoid wrapped lines in the test structs.
#define FPL(x) FILE_PATH_LITERAL(x)
@@ -1126,6 +1130,10 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe) {
"\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" },
};
+#if !defined(SYSTEM_NATIVE_UTF8) && defined(OS_LINUX)
+ ScopedLocale locale("en_US.UTF-8");
+#endif
+
for (size_t i = 0; i < arraysize(cases); ++i) {
// Test FromUTF8Unsafe() works.
FilePath from_utf8 = FilePath::FromUTF8Unsafe(cases[i].utf8);