Index: base/files/file_util_unittest.cc |
diff --git a/base/files/file_util_unittest.cc b/base/files/file_util_unittest.cc |
index 08c9587cc0655895e4604cc7e85be88f25215d05..46375ccdeb5053956364ca85826044f521fea096 100644 |
--- a/base/files/file_util_unittest.cc |
+++ b/base/files/file_util_unittest.cc |
@@ -1471,12 +1471,12 @@ TEST_F(FileUtilTest, CopyFile) { |
FilePath dest_file = dir_name_from.Append(FILE_PATH_LITERAL("DestFile.txt")); |
ASSERT_TRUE(CopyFile(file_name_from, dest_file)); |
- // Copy the file to another location using '..' in the path. |
+ // Try to copy the file to another location using '..' in the path. |
FilePath dest_file2(dir_name_from); |
dest_file2 = dest_file2.AppendASCII(".."); |
dest_file2 = dest_file2.AppendASCII("DestFile.txt"); |
ASSERT_FALSE(CopyFile(file_name_from, dest_file2)); |
- ASSERT_TRUE(internal::CopyFileUnsafe(file_name_from, dest_file2)); |
+ ASSERT_FALSE(internal::CopyFileUnsafe(file_name_from, dest_file2)); |
rvargas (doing something else)
2014/11/11 23:40:49
Aha!. So the code was already there :)
What we ne
|
FilePath dest_file2_test(dir_name_from); |
dest_file2_test = dest_file2_test.DirName(); |
@@ -1487,8 +1487,8 @@ TEST_F(FileUtilTest, CopyFile) { |
EXPECT_TRUE(PathExists(dest_file)); |
const std::wstring read_contents = ReadTextFile(dest_file); |
EXPECT_EQ(file_contents, read_contents); |
- EXPECT_TRUE(PathExists(dest_file2_test)); |
- EXPECT_TRUE(PathExists(dest_file2)); |
+ EXPECT_FALSE(PathExists(dest_file2_test)); |
+ EXPECT_FALSE(PathExists(dest_file2)); |
} |
TEST_F(FileUtilTest, CopyFileACL) { |