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

Side by Side Diff: content/test/test_render_frame_host.cc

Issue 2101323002: Add 'NavigationHandle::QueueConsoleMessage'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: -public Created 4 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 unified diff | Download patch
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/guid.h" 7 #include "base/guid.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_handle_impl.h" 9 #include "content/browser/frame_host/navigation_handle_impl.h"
10 #include "content/browser/frame_host/navigation_request.h" 10 #include "content/browser/frame_host/navigation_request.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 TestRenderViewHost* TestRenderFrameHost::GetRenderViewHost() { 68 TestRenderViewHost* TestRenderFrameHost::GetRenderViewHost() {
69 return static_cast<TestRenderViewHost*>( 69 return static_cast<TestRenderViewHost*>(
70 RenderFrameHostImpl::GetRenderViewHost()); 70 RenderFrameHostImpl::GetRenderViewHost());
71 } 71 }
72 72
73 MockRenderProcessHost* TestRenderFrameHost::GetProcess() { 73 MockRenderProcessHost* TestRenderFrameHost::GetProcess() {
74 return static_cast<MockRenderProcessHost*>(RenderFrameHostImpl::GetProcess()); 74 return static_cast<MockRenderProcessHost*>(RenderFrameHostImpl::GetProcess());
75 } 75 }
76 76
77 void TestRenderFrameHost::AddMessageToConsole(ConsoleMessageLevel level,
78 const std::string& message) {
79 RenderFrameHostImpl::AddMessageToConsole(level, message);
80 console_messages_.push_back(message);
81 }
82
77 void TestRenderFrameHost::InitializeRenderFrameIfNeeded() { 83 void TestRenderFrameHost::InitializeRenderFrameIfNeeded() {
78 if (!render_view_host()->IsRenderViewLive()) { 84 if (!render_view_host()->IsRenderViewLive()) {
79 render_view_host()->GetProcess()->Init(); 85 render_view_host()->GetProcess()->Init();
80 RenderViewHostTester::For(render_view_host())->CreateTestRenderView( 86 RenderViewHostTester::For(render_view_host())->CreateTestRenderView(
81 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false); 87 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false);
82 } 88 }
83 } 89 }
84 90
85 TestRenderFrameHost* TestRenderFrameHost::AppendChild( 91 TestRenderFrameHost* TestRenderFrameHost::AppendChild(
86 const std::string& frame_name) { 92 const std::string& frame_name) {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // cleared during DidFailProvisionalLoad). 439 // cleared during DidFailProvisionalLoad).
434 int page_id = entry ? entry->GetPageID() : -1; 440 int page_id = entry ? entry->GetPageID() : -1;
435 if (page_id == -1) { 441 if (page_id == -1) {
436 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); 442 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate());
437 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; 443 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1;
438 } 444 }
439 return page_id; 445 return page_id;
440 } 446 }
441 447
442 } // namespace content 448 } // namespace content
OLDNEW
« content/browser/frame_host/navigation_handle_impl.h ('K') | « content/test/test_render_frame_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698