Index: chrome/browser/safe_browsing/safe_browsing_database_unittest.cc |
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc |
index 31168452cfb31436e51ab2a77745223911145e36..5b7c4c610ca7e077ad4670aa36eef310100fd5df 100644 |
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc |
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc |
@@ -210,39 +210,6 @@ std::unique_ptr<SBChunkData> AddChunkHashedIpValue(int chunk_number, |
&full_hash, sizeof(full_hash), std::vector<int>()); |
} |
-// Prevent DCHECK from killing tests. |
-// TODO(shess): Pawel disputes the use of this, so the test which uses |
-// it is DISABLED. http://crbug.com/56448 |
-class ScopedLogMessageIgnorer { |
- public: |
- ScopedLogMessageIgnorer() { |
- logging::SetLogMessageHandler(&LogMessageIgnorer); |
- } |
- ~ScopedLogMessageIgnorer() { |
- // TODO(shess): Would be better to verify whether anyone else |
- // changed it, and then restore it to the previous value. |
- logging::SetLogMessageHandler(NULL); |
- } |
- |
- private: |
- static bool LogMessageIgnorer(int severity, const char* file, int line, |
- size_t message_start, const std::string& str) { |
- // Intercept FATAL, strip the stack backtrace, and log it without |
- // the crash part. |
- if (severity == logging::LOG_FATAL) { |
- size_t newline = str.find('\n'); |
- if (newline != std::string::npos) { |
- const std::string msg = str.substr(0, newline + 1); |
- fprintf(stderr, "%s", msg.c_str()); |
- fflush(stderr); |
- } |
- return true; |
- } |
- |
- return false; |
- } |
-}; |
- |
} // namespace |
class SafeBrowsingDatabaseTest : public PlatformTest { |
@@ -1172,7 +1139,7 @@ TEST_F(SafeBrowsingDatabaseTest, HashCaching) { |
// Test that corrupt databases are appropriately handled, even if the |
// corruption is detected in the midst of the update. |
-// TODO(shess): Disabled until ScopedLogMessageIgnorer resolved. |
+// TODO(shess): Disabled until DCHECK killing is resolved. |
// http://crbug.com/56448 |
TEST_F(SafeBrowsingDatabaseTest, DISABLED_FileCorruptionHandling) { |
// Re-create the database in a captive message loop so that we can |
@@ -1207,8 +1174,10 @@ TEST_F(SafeBrowsingDatabaseTest, DISABLED_FileCorruptionHandling) { |
fclose(fp); |
{ |
- // The following code will cause DCHECKs, so suppress the crashes. |
- ScopedLogMessageIgnorer ignorer; |
+ // The following code will cause DCHECKs. |
+ // There's no way to prevent DCHECK from killing tests. |
+ // TODO(shess): Pawel disputes the use of using (removed) LogMessageHandler |
+ // to hijack the message, so this test is DISABLED. http://crbug.com/56448 |
// Start an update. The insert will fail due to corruption. |
ASSERT_TRUE(database_->UpdateStarted(&lists)); |