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

Unified Diff: content/browser/renderer_host/websocket_dispatcher_host_unittest.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
Index: content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
===================================================================
--- content/browser/renderer_host/websocket_dispatcher_host_unittest.cc (revision 271040)
+++ content/browser/renderer_host/websocket_dispatcher_host_unittest.cc (working copy)
@@ -31,8 +31,7 @@
virtual ~MockWebSocketHost() {}
- virtual bool OnMessageReceived(const IPC::Message& message,
- bool* message_was_ok) OVERRIDE{
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE{
received_messages_.push_back(message);
return true;
}
@@ -78,9 +77,8 @@
}
TEST_F(WebSocketDispatcherHostTest, UnrelatedMessage) {
- bool message_was_ok = false;
IPC::Message message;
- EXPECT_FALSE(dispatcher_host_->OnMessageReceived(message, &message_was_ok));
+ EXPECT_FALSE(dispatcher_host_->OnMessageReceived(message));
}
TEST_F(WebSocketDispatcherHostTest, AddChannelRequest) {
@@ -92,8 +90,7 @@
WebSocketHostMsg_AddChannelRequest message(
routing_id, socket_url, requested_protocols, origin);
- bool message_was_ok = false;
- ASSERT_TRUE(dispatcher_host_->OnMessageReceived(message, &message_was_ok));
+ ASSERT_TRUE(dispatcher_host_->OnMessageReceived(message));
ASSERT_EQ(1U, mock_hosts_.size());
MockWebSocketHost* host = mock_hosts_[0];
@@ -110,9 +107,8 @@
WebSocketMsg_SendFrame message(
routing_id, true, WEB_SOCKET_MESSAGE_TYPE_TEXT, data);
- bool message_was_ok = false;
// Expected to be ignored.
- EXPECT_TRUE(dispatcher_host_->OnMessageReceived(message, &message_was_ok));
+ EXPECT_TRUE(dispatcher_host_->OnMessageReceived(message));
EXPECT_EQ(0U, mock_hosts_.size());
}
@@ -127,17 +123,13 @@
WebSocketHostMsg_AddChannelRequest add_channel_message(
routing_id, socket_url, requested_protocols, origin);
- bool message_was_ok = false;
+ ASSERT_TRUE(dispatcher_host_->OnMessageReceived(add_channel_message));
- ASSERT_TRUE(dispatcher_host_->OnMessageReceived(
- add_channel_message, &message_was_ok));
-
std::vector<char> data;
WebSocketMsg_SendFrame send_frame_message(
routing_id, true, WEB_SOCKET_MESSAGE_TYPE_TEXT, data);
- EXPECT_TRUE(dispatcher_host_->OnMessageReceived(
- send_frame_message, &message_was_ok));
+ EXPECT_TRUE(dispatcher_host_->OnMessageReceived(send_frame_message));
ASSERT_EQ(1U, mock_hosts_.size());
MockWebSocketHost* host = mock_hosts_[0];
« no previous file with comments | « content/browser/renderer_host/websocket_dispatcher_host.cc ('k') | content/browser/renderer_host/websocket_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698