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

Unified Diff: base/files/file_util_unittest.cc

Issue 693493004: Revert of Allow POSIX callers to specify a new file's mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/files/file_util_posix.cc ('k') | content/browser/download/base_file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_unittest.cc
diff --git a/base/files/file_util_unittest.cc b/base/files/file_util_unittest.cc
index e61cb89267feb3fe22dfafdc0098db1b82d211b4..08c9587cc0655895e4604cc7e85be88f25215d05 100644
--- a/base/files/file_util_unittest.cc
+++ b/base/files/file_util_unittest.cc
@@ -2143,28 +2143,6 @@
file_info.last_modified.ToInternalValue());
}
-#if defined(OS_POSIX) && !defined(OS_ANDROID)
-TEST_F(FileUtilTest, WriteFileWithMode) {
- FilePath data_dir =
- temp_dir_.path().Append(FILE_PATH_LITERAL("FilePathTest"));
-
- // Create a fresh, empty copy of this directory.
- if (PathExists(data_dir)) {
- ASSERT_TRUE(DeleteFile(data_dir, true));
- }
- ASSERT_TRUE(CreateDirectory(data_dir));
-
- FilePath foobar(data_dir.Append(FILE_PATH_LITERAL("foobar.txt")));
- std::string data("hello");
- mode_t mode = 0644;
- ASSERT_TRUE(WriteFileWithMode(foobar, data.c_str(), data.length(), mode));
-
- struct stat status;
- ASSERT_EQ(0, stat(foobar.value().c_str(), &status));
- ASSERT_EQ(mode, status.st_mode & 0777);
-}
-#endif
-
TEST_F(FileUtilTest, IsDirectoryEmpty) {
FilePath empty_dir = temp_dir_.path().Append(FILE_PATH_LITERAL("EmptyDir"));
« no previous file with comments | « base/files/file_util_posix.cc ('k') | content/browser/download/base_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698