commit | d2c3c29e263ebd0382593b2d0f9de17f471a0735 | [log] [tgz] |
---|---|---|
author | Scott Graham <[email protected]> | Tue Jun 20 19:28:47 2017 |
committer | Commit Bot <[email protected]> | Tue Jun 20 21:56:48 2017 |
tree | c217854edc96e8f4b55eabc903e0b86cc405bde4 | |
parent | 7cd9719fddbbaf65e7269c599942e5537eabe816 [diff] [blame] |
fuchsia: Fix ImportantFileWriterTest.WriteFileAtomicallyHistogramSuffixTest Recently added in https://codereview.chromium.org/2920223002/. This test was trying to test for failure in writing to "bad/../path", which in FilePath terms is "/path". On most POSIX OS's, this fails because / tends to not be writable, however Fuchsia's root is virtual so apps (at least currently) can successfully write there. Change the test path to "bad/../non_existent/path" so that the non-existence of /non_existent causes the file creation to fail. Bug: 706592 Change-Id: I5f8f22e59a0b157a9ec7f8309cc1175e4d9d0a79 Reviewed-on: https://chromium-review.googlesource.com/541677 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Scott Graham <[email protected]> Cr-Commit-Position: refs/heads/master@{#480975}
diff --git a/base/files/important_file_writer_unittest.cc b/base/files/important_file_writer_unittest.cc index e5afedb..a0ef589d 100644 --- a/base/files/important_file_writer_unittest.cc +++ b/base/files/important_file_writer_unittest.cc
@@ -335,7 +335,7 @@ histogram_tester.ExpectTotalCount("ImportantFile.FileCreateError", 0); histogram_tester.ExpectTotalCount("ImportantFile.FileCreateError.test", 0); - FilePath invalid_file_ = FilePath().AppendASCII("bad/../path"); + FilePath invalid_file_ = FilePath().AppendASCII("bad/../non_existent/path"); EXPECT_FALSE(PathExists(invalid_file_)); EXPECT_FALSE( ImportantFileWriter::WriteFileAtomically(invalid_file_, nullptr));