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

Unified Diff: ipc/ipc_sync_channel_unittest.cc

Issue 4262001: Fixed bug where CHECKs don't fire if min_log_level > FATAL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed ipc_tests Created 10 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 | « base/logging_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel_unittest.cc
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index ffd2efd230b1da0feb390f4966176d32b7cc74e1..15d5a38a5672d08d122ede9f4ad987e6b75d2e94 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -808,6 +808,8 @@ TEST_F(IPCSyncChannelTest, QueuedReply) {
namespace {
+void DropAssert(const std::string&) {}
+
class BadServer : public Worker {
public:
explicit BadServer(bool pump_during_send)
@@ -822,12 +824,11 @@ class BadServer : public Worker {
if (pump_during_send_)
msg->EnableMessagePumping();
- // Temporarily set the minimum logging very high so that the assertion
- // in ipc_message_utils doesn't fire.
- int log_level = logging::GetMinLogLevel();
- logging::SetMinLogLevel(kint32max);
+ // Temporarily ignore asserts so that the assertion in
+ // ipc_message_utils doesn't cause termination.
+ logging::SetLogAssertHandler(&DropAssert);
bool result = Send(msg);
- logging::SetMinLogLevel(log_level);
+ logging::SetLogAssertHandler(NULL);
DCHECK(!result);
// Need to send another message to get the client to call Done().
« no previous file with comments | « base/logging_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698