diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 16:31:17 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 16:31:17 +0000 |
commit | 88a14fa437caa6df64fece3df39c8ec8bde31f84 (patch) | |
tree | d6e54241a391780672ef4dd4866d7c9515f8ad74 /ipc/ipc_sync_channel_unittest.cc | |
parent | ed6e01091824870c53005e4c6a3d4c74aac5ef59 (diff) | |
download | chromium_src-88a14fa437caa6df64fece3df39c8ec8bde31f84.zip chromium_src-88a14fa437caa6df64fece3df39c8ec8bde31f84.tar.gz chromium_src-88a14fa437caa6df64fece3df39c8ec8bde31f84.tar.bz2 |
Remove IPCSyncChannelTest.BadMessage
The test was trying to check that a DCHECK is being hit,
but it's not really the best thing to do.
BUG=62511
Review URL: http://codereview.chromium.org/7457010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_sync_channel_unittest.cc')
-rw-r--r-- | ipc/ipc_sync_channel_unittest.cc | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc index 3bd2fda..5256de8b 100644 --- a/ipc/ipc_sync_channel_unittest.cc +++ b/ipc/ipc_sync_channel_unittest.cc @@ -806,66 +806,6 @@ TEST_F(IPCSyncChannelTest, QueuedReply) { namespace { -void DropAssert(const std::string&) {} - -class BadServer : public Worker { - public: - explicit BadServer(bool pump_during_send) - : Worker(Channel::MODE_SERVER, "simpler_server"), - pump_during_send_(pump_during_send) { } - void Run() { - int answer = 0; - - SyncMessage* msg = new SyncMessage( - MSG_ROUTING_CONTROL, SyncChannelTestMsg_Double::ID, - Message::PRIORITY_NORMAL, NULL); - if (pump_during_send_) - msg->EnableMessagePumping(); - - // Temporarily ignore asserts so that the assertion in - // ipc_message_utils doesn't cause termination. - logging::SetLogAssertHandler(&DropAssert); - bool result = Send(msg); - logging::SetLogAssertHandler(NULL); - DCHECK(!result); - - // Need to send another message to get the client to call Done(). - result = Send(new SyncChannelTestMsg_AnswerToLife(&answer)); - DCHECK(result); - DCHECK_EQ(answer, 42); - - Done(); - } - - bool pump_during_send_; -}; - -void BadMessage(bool pump_during_send) { - std::vector<Worker*> workers; - workers.push_back(new BadServer(pump_during_send)); - workers.push_back(new SimpleClient()); - RunTest(workers); -} - -} // namespace - -#if defined(OS_WIN) -// Crashy on windows. See crbug.com/62511. -#define MAYBE_BadMessage DISABLED_BadMessage -#else -#define MAYBE_BadMessage BadMessage -#endif - -// Tests that if a message is not serialized correctly, the Send() will fail. -TEST_F(IPCSyncChannelTest, MAYBE_BadMessage) { - BadMessage(false); - BadMessage(true); -} - -//----------------------------------------------------------------------------- - -namespace { - class ChattyClient : public Worker { public: ChattyClient() : |