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

Unified Diff: base/files/file_unittest.cc

Issue 711973002: Remove FileTest.MemoryCorruption death test regexp assertions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@checksum_fds_by_master
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_unittest.cc
diff --git a/base/files/file_unittest.cc b/base/files/file_unittest.cc
index 9f57974d8cb41021cb74f11b580afd0b49cf5a3a..3bc2db60f0e4fd85b24aacc1efc583a41ce4f457 100644
--- a/base/files/file_unittest.cc
+++ b/base/files/file_unittest.cc
@@ -476,7 +476,7 @@ TEST(FileTest, MemoryCorruption) {
EXPECT_NE(file.file_.file_memory_checksum_,
implicit_cast<unsigned int>(file.GetPlatformFile()));
file.file_.file_memory_checksum_ = file.GetPlatformFile();
- EXPECT_DEATH(file.IsValid(), "corrupted fd memory");
+ EXPECT_DEATH(file.IsValid(), "");
file.file_.UpdateChecksum(); // Do not crash on File::~File().
}
@@ -485,7 +485,7 @@ TEST(FileTest, MemoryCorruption) {
// Test that changing the file descriptor value is detected.
base::File file;
file.file_.file_.reset(17);
- EXPECT_DEATH(file.IsValid(), "corrupted fd memory");
+ EXPECT_DEATH(file.IsValid(), "");
// Do not crash on File::~File().
ignore_result(file.file_.file_.release());
@@ -496,7 +496,7 @@ TEST(FileTest, MemoryCorruption) {
// Test that GetPlatformFile() checks for corruption.
base::File file;
file.file_.file_memory_checksum_ = file.GetPlatformFile();
- EXPECT_DEATH(file.GetPlatformFile(), "corrupted fd memory");
+ EXPECT_DEATH(file.GetPlatformFile(), "");
file.file_.UpdateChecksum(); // Do not crash on File::~File().
}
@@ -505,7 +505,7 @@ TEST(FileTest, MemoryCorruption) {
// Test that the base::File destructor checks for corruption.
scoped_ptr<base::File> file(new File());
file->file_.file_memory_checksum_ = file->GetPlatformFile();
- EXPECT_DEATH(file.reset(), "corrupted fd memory");
+ EXPECT_DEATH(file.reset(), "");
// Do not crash on this thread's destructor call.
file->file_.UpdateChecksum();
@@ -515,7 +515,7 @@ TEST(FileTest, MemoryCorruption) {
// Test that the base::File constructor checks for corruption.
base::File file;
file.file_.file_memory_checksum_ = file.GetPlatformFile();
- EXPECT_DEATH(File f(file.Pass()), "corrupted fd memory");
+ EXPECT_DEATH(File f(file.Pass()), "");
file.file_.UpdateChecksum(); // Do not crash on File::~File().
}
@@ -525,10 +525,10 @@ TEST(FileTest, MemoryCorruption) {
base::File file;
file.file_.file_.reset(17); // A fake open FD value.
- EXPECT_DEATH(file.Seek(File::FROM_BEGIN, 0), "corrupted fd memory");
- EXPECT_DEATH(file.Read(0, NULL, 0), "corrupted fd memory");
- EXPECT_DEATH(file.ReadAtCurrentPos(NULL, 0), "corrupted fd memory");
- EXPECT_DEATH(file.Write(0, NULL, 0), "corrupted fd memory");
+ EXPECT_DEATH(file.Seek(File::FROM_BEGIN, 0), "");
+ EXPECT_DEATH(file.Read(0, NULL, 0), "");
+ EXPECT_DEATH(file.ReadAtCurrentPos(NULL, 0), "");
+ EXPECT_DEATH(file.Write(0, NULL, 0), "");
ignore_result(file.file_.file_.release());
file.file_.UpdateChecksum();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698