Index: base/files/file_path_unittest.cc |
diff --git a/base/files/file_path_unittest.cc b/base/files/file_path_unittest.cc |
index 60eaa8f002f2e1103ad78dfc6fdaf4f5b7849bb0..f988bd6d508ce3e9c76ac45a1f5e53d66364daf6 100644 |
--- a/base/files/file_path_unittest.cc |
+++ b/base/files/file_path_unittest.cc |
@@ -7,6 +7,7 @@ |
#include "base/basictypes.h" |
#include "base/files/file_path.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "base/test/scoped_locale.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "testing/platform_test.h" |
@@ -1126,6 +1127,10 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe) { |
"\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" }, |
}; |
+#if !defined(SYSTEM_NATIVE_UTF8) |
+ 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); |