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

Unified Diff: content/browser/frame_host/navigator_impl_unittest.cc

Issue 1051343005: Add covariant overrides to TestRVH::GetProcess and TestRFH::GetProcess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unittest_frame_liveness
Patch Set: Rebase Created 5 years, 8 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/frame_host/navigator_impl_unittest.cc
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index f8069f526fb74391a0d02ab6efb8e9ed30a98633..39e814a34f74565891f3e8fc8563bc7fbc33b93f 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -84,12 +84,10 @@ class NavigatorTestWithBrowserSideNavigation
// Note: caller must invoke ClearMessages on the sink at some point before
// the tracked commit happens to clear up commit messages from previous
// navigations.
- bool DidRenderFrameHostRequestCommit(RenderFrameHostImpl* rfh) {
- MockRenderProcessHost* rph =
- static_cast<MockRenderProcessHost*>(rfh->GetProcess());
+ bool DidRenderFrameHostRequestCommit(TestRenderFrameHost* rfh) {
const FrameMsg_CommitNavigation* commit_message =
static_cast<const FrameMsg_CommitNavigation*>(
- rph->sink().GetUniqueMessageMatching(
+ rfh->GetProcess()->sink().GetUniqueMessageMatching(
FrameMsg_CommitNavigation::ID));
return commit_message &&
rfh->GetRoutingID() == commit_message->routing_id();
@@ -938,9 +936,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Now go back to the initial site so that the swapped out RenderFrameHost
// should be reused.
process()->sink().ClearMessages();
- static_cast<MockRenderProcessHost*>(rfh1->GetProcess())
- ->sink()
- .ClearMessages();
+ rfh1->GetProcess()->sink().ClearMessages();
RequestNavigation(node, kUrl1);
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));

Powered by Google App Engine
This is Rietveld 408576698