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 "content/browser/frame_host/frame_tree.h" | 7 #include "content/browser/frame_host/frame_tree.h" |
8 #include "content/browser/frame_host/render_frame_host_delegate.h" | 8 #include "content/browser/frame_host/render_frame_host_delegate.h" |
9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
10 #include "content/public/common/page_transition_types.h" | |
10 #include "content/test/test_render_view_host.h" | 11 #include "content/test/test_render_view_host.h" |
12 #include "net/base/load_flags.h" | |
13 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" | |
11 | 14 |
12 namespace content { | 15 namespace content { |
13 | 16 |
14 TestRenderFrameHostCreationObserver::TestRenderFrameHostCreationObserver( | 17 TestRenderFrameHostCreationObserver::TestRenderFrameHostCreationObserver( |
15 WebContents* web_contents) | 18 WebContents* web_contents) |
16 : WebContentsObserver(web_contents), last_created_frame_(NULL) { | 19 : WebContentsObserver(web_contents), last_created_frame_(NULL) { |
17 } | 20 } |
18 | 21 |
19 TestRenderFrameHostCreationObserver::~TestRenderFrameHostCreationObserver() { | 22 TestRenderFrameHostCreationObserver::~TestRenderFrameHostCreationObserver() { |
20 } | 23 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 params.page_state = PageState::CreateForTesting( | 153 params.page_state = PageState::CreateForTesting( |
151 url, | 154 url, |
152 false, | 155 false, |
153 file_path_for_history_item ? "data" : NULL, | 156 file_path_for_history_item ? "data" : NULL, |
154 file_path_for_history_item); | 157 file_path_for_history_item); |
155 | 158 |
156 FrameHostMsg_DidCommitProvisionalLoad msg(GetRoutingID(), params); | 159 FrameHostMsg_DidCommitProvisionalLoad msg(GetRoutingID(), params); |
157 OnNavigate(msg); | 160 OnNavigate(msg); |
158 } | 161 } |
159 | 162 |
163 void TestRenderFrameHost::SendBeginNavigationWithURL(const GURL& url) { | |
164 FrameHostMsg_BeginNavigation_Params params; | |
165 params.method="GET"; | |
davidben
2014/07/09 15:14:28
Nit: spaces around the =.
clamy
2014/07/15 15:32:14
Done.
| |
166 params.url = url; | |
167 params.referrer_policy = blink::WebReferrerPolicyDefault; | |
168 params.load_flags = net::LOAD_NORMAL | net::LOAD_ENABLE_LOAD_TIMING; | |
169 params.has_user_gesture = false; | |
170 params.transition_type = PAGE_TRANSITION_LINK; | |
171 params.should_replace_current_entry = false; | |
172 params.allow_download = true; | |
173 OnBeginNavigation(params); | |
174 } | |
160 } // namespace content | 175 } // namespace content |
OLD | NEW |