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

Unified Diff: chrome/renderer/render_view_unittest.cc

Issue 18326: Factor out the message sink from MockRenderThread to a separate class. I will... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « chrome/renderer/mock_render_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view_unittest.cc
===================================================================
--- chrome/renderer/render_view_unittest.cc (revision 8187)
+++ chrome/renderer/render_view_unittest.cc (working copy)
@@ -94,11 +94,11 @@
// We should have gotten two different types of start messages in the
// following order.
- ASSERT_EQ(2, render_thread_.message_count());
- const IPC::Message* msg = render_thread_.GetMessageAt(0);
+ ASSERT_EQ(2, render_thread_.sink().message_count());
+ const IPC::Message* msg = render_thread_.sink().GetMessageAt(0);
EXPECT_EQ(ViewHostMsg_DidStartLoading::ID, msg->type());
- msg = render_thread_.GetMessageAt(1);
+ msg = render_thread_.sink().GetMessageAt(1);
EXPECT_EQ(ViewHostMsg_DidStartProvisionalLoadForFrame::ID, msg->type());
ViewHostMsg_DidStartProvisionalLoadForFrame::Param start_params;
ViewHostMsg_DidStartProvisionalLoadForFrame::Read(msg, &start_params);
@@ -115,14 +115,14 @@
LoadHTML("<input type=\"text\" id=\"elt_text\"></input>");
// We should NOT have gotten a form state change notification yet.
- EXPECT_FALSE(render_thread_.GetFirstMessageMatching(
+ EXPECT_FALSE(render_thread_.sink().GetFirstMessageMatching(
ViewHostMsg_UpdateState::ID));
- render_thread_.ClearMessages();
+ render_thread_.sink().ClearMessages();
// Change the value of the input. We should have gotten an update state
// notification. We need to spin the message loop to catch this update.
ExecuteJavaScript("document.getElementById('elt_text').value = 'foo';");
ProcessPendingMessages();
- EXPECT_TRUE(render_thread_.GetUniqueMessageMatching(
+ EXPECT_TRUE(render_thread_.sink().GetUniqueMessageMatching(
ViewHostMsg_UpdateState::ID));
}
« no previous file with comments | « chrome/renderer/mock_render_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698