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.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index 8f5ce19..98c2032 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -984,7 +984,9 @@ TEST_F(FileUtilTest, Contains) {
data_dir = data_dir.Append(FILE_PATH_LITERAL("FilePathTest"));
// Create a fresh, empty copy of this directory.
- ASSERT_TRUE(file_util::Delete(data_dir, true));
+ if (file_util::PathExists(data_dir)) {
+ ASSERT_TRUE(file_util::Delete(data_dir, true));
+ }
ASSERT_TRUE(file_util::CreateDirectory(data_dir));
FilePath foo(data_dir.Append(FILE_PATH_LITERAL("foo")));