Index: base/file_util_unittest.cc |
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc |
index df447ab9b4e3927b9a80c8d3d0e52278d390b218..69414b4e9f9cd807b2ceec806a92c0353d7c9f81 100644 |
--- a/base/file_util_unittest.cc |
+++ b/base/file_util_unittest.cc |
@@ -1691,6 +1691,17 @@ TEST_F(FileUtilTest, GetShmemTempDirTest) { |
EXPECT_TRUE(DirectoryExists(dir)); |
} |
+TEST_F(FileUtilTest, GetHomeDirTest) { |
+#if !defined(OS_ANDROID) // Not implemented on Android. |
+ // We don't actually know what the home directory is supposed to be without |
+ // calling some OS functions which would just duplicate the implementation. |
+ // So here we just test that it returns something "reasonable". |
+ FilePath home = GetHomeDir(); |
+ ASSERT_FALSE(home.empty()); |
+ ASSERT_TRUE(home.IsAbsolute()); |
+#endif |
+} |
+ |
TEST_F(FileUtilTest, CreateDirectoryTest) { |
FilePath test_root = |
temp_dir_.path().Append(FILE_PATH_LITERAL("create_directory_test")); |