summaryrefslogtreecommitdiffstats
path: root/base/file_util_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_util_unittest.cc')
-rw-r--r--base/file_util_unittest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index d36d4b2..93e82aa 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"));