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

Unified Diff: ipc/ipc_sync_channel_unittest.cc

Issue 7457010: Remove IPCSyncChannelTest.BadMessage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months 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: ipc/ipc_sync_channel_unittest.cc
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index f94e949a5bad78e83c28cbd1edfba32c53222211..cbb02b2fca3511dc43280ec27531f2234b135a68 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() :
« 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