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

Unified Diff: base/file_util_unittest.cc

Issue 132183007: Modify CopyFileUnsafe() on OSX to stop copying ACL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 6 years, 10 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/file_util_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_unittest.cc
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index 49dd5ad3587761f1b64a5b51db063dcd2c8ab16d..df447ab9b4e3927b9a80c8d3d0e52278d390b218 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -1411,16 +1411,7 @@ TEST_F(FileUtilTest, CopyDirectoryACL) {
FilePath dst_file = dst.Append(FILE_PATH_LITERAL("src.txt"));
EXPECT_TRUE(CopyDirectory(src, dst, true));
-#if defined(OS_WIN)
- // While the source file had RO bit set, the copied file doesn't.
- ASSERT_FALSE(IsReadOnly(dst_file));
-#elif defined(OS_MACOSX)
- // On OSX, file mode is copied.
- ASSERT_TRUE(IsReadOnly(dst_file));
-#else
- // On other POSIX, file mode is not copied.
ASSERT_FALSE(IsReadOnly(dst_file));
-#endif
}
TEST_F(FileUtilTest, CopyFile) {
@@ -1479,17 +1470,7 @@ TEST_F(FileUtilTest, CopyFileACL) {
ASSERT_TRUE(CopyFile(src, dst));
EXPECT_EQ(file_contents, ReadTextFile(dst));
-#if defined(OS_WIN)
- // While the source file had RO bit set, the copied file doesn't. Other file
- // modes are copied.
- ASSERT_FALSE(IsReadOnly(dst));
-#elif defined(OS_MACOSX)
- // On OSX, file mode is copied.
- ASSERT_TRUE(IsReadOnly(dst));
-#else
- // On other POSIX, file mode is not copied.
ASSERT_FALSE(IsReadOnly(dst));
-#endif
}
// file_util winds up using autoreleased objects on the Mac, so this needs
« no previous file with comments | « base/file_util_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698