OLD | NEW |
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_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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (!render_view_host()->IsRenderViewLive()) { | 78 if (!render_view_host()->IsRenderViewLive()) { |
79 RenderViewHostTester::For(render_view_host())->CreateTestRenderView( | 79 RenderViewHostTester::For(render_view_host())->CreateTestRenderView( |
80 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false); | 80 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false); |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 TestRenderFrameHost* TestRenderFrameHost::AppendChild( | 84 TestRenderFrameHost* TestRenderFrameHost::AppendChild( |
85 const std::string& frame_name) { | 85 const std::string& frame_name) { |
86 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), | 86 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), |
87 blink::WebTreeScopeType::Document, frame_name, | 87 blink::WebTreeScopeType::Document, frame_name, |
88 blink::WebSandboxFlags::None); | 88 blink::WebSandboxFlags::None, |
| 89 blink::WebFrameOwnerProperties()); |
89 return static_cast<TestRenderFrameHost*>( | 90 return static_cast<TestRenderFrameHost*>( |
90 child_creation_observer_.last_created_frame()); | 91 child_creation_observer_.last_created_frame()); |
91 } | 92 } |
92 | 93 |
93 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) { | 94 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) { |
94 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 95 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
95 switches::kEnableBrowserSideNavigation)) { | 96 switches::kEnableBrowserSideNavigation)) { |
96 SendRendererInitiatedNavigationRequest(url, false); | 97 SendRendererInitiatedNavigationRequest(url, false); |
97 return; | 98 return; |
98 } | 99 } |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 // cleared during DidFailProvisionalLoad). | 403 // cleared during DidFailProvisionalLoad). |
403 int page_id = entry ? entry->GetPageID() : -1; | 404 int page_id = entry ? entry->GetPageID() : -1; |
404 if (page_id == -1) { | 405 if (page_id == -1) { |
405 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); | 406 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); |
406 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; | 407 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; |
407 } | 408 } |
408 return page_id; | 409 return page_id; |
409 } | 410 } |
410 | 411 |
411 } // namespace content | 412 } // namespace content |
OLD | NEW |