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

Side by Side Diff: content/test/test_render_frame_host.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 unified diff | Download patch
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/test_render_frame_host.h" 5 #include "content/test/test_render_frame_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/frame_host/frame_tree.h" 8 #include "content/browser/frame_host/frame_tree.h"
9 #include "content/browser/frame_host/navigation_request.h" 9 #include "content/browser/frame_host/navigation_request.h"
10 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 TestRenderFrameHost::~TestRenderFrameHost() { 61 TestRenderFrameHost::~TestRenderFrameHost() {
62 SetRenderFrameCreated(false); 62 SetRenderFrameCreated(false);
63 } 63 }
64 64
65 TestRenderViewHost* TestRenderFrameHost::GetRenderViewHost() { 65 TestRenderViewHost* TestRenderFrameHost::GetRenderViewHost() {
66 return static_cast<TestRenderViewHost*>( 66 return static_cast<TestRenderViewHost*>(
67 RenderFrameHostImpl::GetRenderViewHost()); 67 RenderFrameHostImpl::GetRenderViewHost());
68 } 68 }
69 69
70 MockRenderProcessHost* TestRenderFrameHost::GetProcess() {
71 return static_cast<MockRenderProcessHost*>(RenderFrameHostImpl::GetProcess());
72 }
73
70 TestRenderFrameHost* TestRenderFrameHost::AppendChild( 74 TestRenderFrameHost* TestRenderFrameHost::AppendChild(
71 const std::string& frame_name) { 75 const std::string& frame_name) {
72 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), frame_name, 76 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), frame_name,
73 SandboxFlags::NONE); 77 SandboxFlags::NONE);
74 return static_cast<TestRenderFrameHost*>( 78 return static_cast<TestRenderFrameHost*>(
75 child_creation_observer_.last_created_frame()); 79 child_creation_observer_.last_created_frame());
76 } 80 }
77 81
78 void TestRenderFrameHost::SendNavigateWithTransition( 82 void TestRenderFrameHost::SendNavigateWithTransition(
79 int page_id, 83 int page_id,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 url_loader->SimulateServerRedirect(redirect_url); 266 url_loader->SimulateServerRedirect(redirect_url);
263 267
264 // Simulate the network stack commit. 268 // Simulate the network stack commit.
265 scoped_refptr<ResourceResponse> response(new ResourceResponse); 269 scoped_refptr<ResourceResponse> response(new ResourceResponse);
266 // TODO(carlosk): ideally with PlzNavigate it should be possible someday to 270 // TODO(carlosk): ideally with PlzNavigate it should be possible someday to
267 // fully commit the navigation at this call to CallOnResponseStarted. 271 // fully commit the navigation at this call to CallOnResponseStarted.
268 url_loader->CallOnResponseStarted(response, MakeEmptyStream()); 272 url_loader->CallOnResponseStarted(response, MakeEmptyStream());
269 } 273 }
270 274
271 } // namespace content 275 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698