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/browser/renderer_host/test_render_view_host.cc

Issue 10801011: When simulating a navigation via TestRenderViewHost, first start a provisional load before committin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove web_navigation bits Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/test_backing_store.h" 5 #include "content/browser/renderer_host/test_backing_store.h"
6 #include "content/browser/renderer_host/test_render_view_host.h" 6 #include "content/browser/renderer_host/test_render_view_host.h"
7 #include "content/browser/site_instance_impl.h" 7 #include "content/browser/site_instance_impl.h"
8 #include "content/browser/web_contents/navigation_controller_impl.h" 8 #include "content/browser/web_contents/navigation_controller_impl.h"
9 #include "content/browser/web_contents/test_web_contents.h" 9 #include "content/browser/web_contents/test_web_contents.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 bool TestRenderViewHost::IsRenderViewLive() const { 254 bool TestRenderViewHost::IsRenderViewLive() const {
255 return render_view_created_; 255 return render_view_created_;
256 } 256 }
257 257
258 void TestRenderViewHost::SendNavigate(int page_id, const GURL& url) { 258 void TestRenderViewHost::SendNavigate(int page_id, const GURL& url) {
259 SendNavigateWithTransition(page_id, url, PAGE_TRANSITION_LINK); 259 SendNavigateWithTransition(page_id, url, PAGE_TRANSITION_LINK);
260 } 260 }
261 261
262 void TestRenderViewHost::SendNavigateWithTransition( 262 void TestRenderViewHost::SendNavigateWithTransition(
263 int page_id, const GURL& url, PageTransition transition) { 263 int page_id, const GURL& url, PageTransition transition) {
264 OnMsgDidStartProvisionalLoadForFrame(0, true, GURL(), url);
265
264 ViewHostMsg_FrameNavigate_Params params; 266 ViewHostMsg_FrameNavigate_Params params;
265 267
266 params.page_id = page_id; 268 params.page_id = page_id;
269 params.frame_id = 0;
267 params.url = url; 270 params.url = url;
268 params.referrer = Referrer(); 271 params.referrer = Referrer();
269 params.transition = transition; 272 params.transition = transition;
270 params.redirects = std::vector<GURL>(); 273 params.redirects = std::vector<GURL>();
271 params.should_update_history = true; 274 params.should_update_history = true;
272 params.searchable_form_url = GURL(); 275 params.searchable_form_url = GURL();
273 params.searchable_form_encoding = std::string(); 276 params.searchable_form_encoding = std::string();
274 params.password_form = PasswordForm(); 277 params.password_form = PasswordForm();
275 params.security_info = std::string(); 278 params.security_info = std::string();
276 params.gesture = NavigationGestureUser; 279 params.gesture = NavigationGestureUser;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 336
334 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() { 337 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() {
335 return static_cast<TestRenderViewHost*>(active_rvh()); 338 return static_cast<TestRenderViewHost*>(active_rvh());
336 } 339 }
337 340
338 TestWebContents* RenderViewHostImplTestHarness::contents() { 341 TestWebContents* RenderViewHostImplTestHarness::contents() {
339 return static_cast<TestWebContents*>(web_contents()); 342 return static_cast<TestWebContents*>(web_contents());
340 } 343 }
341 344
342 } // namespace content 345 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698