Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2044)

Unified Diff: base/files/file_path_unittest.cc

Issue 1273243002: Updates to base unittests so they run correctly in libchrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Existing tests using ScopedLocale are wrapped by OS_LINUX, trying that Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/files/dir_reader_posix_unittest.cc ('k') | base/strings/sys_string_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bc0e8432e0e1466581a37208d8b8d29e343b458b 100644
--- a/base/files/file_path_unittest.cc
+++ b/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);
« no previous file with comments | « base/files/dir_reader_posix_unittest.cc ('k') | base/strings/sys_string_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698