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

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

Issue 556703004: Remove page id from FrameNavigateParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaner Created 6 years, 3 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 (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/test/test_render_view_host.h" 5 #include "content/test/test_render_view_host.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 9 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
10 #include "content/browser/site_instance_impl.h" 10 #include "content/browser/site_instance_impl.h"
11 #include "content/common/dom_storage/dom_storage_types.h" 11 #include "content/common/dom_storage/dom_storage_types.h"
12 #include "content/common/frame_messages.h" 12 #include "content/common/frame_messages.h"
13 #include "content/common/view_messages.h" 13 #include "content/common/view_messages.h"
14 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
15 #include "content/public/browser/navigation_controller.h" 15 #include "content/public/browser/navigation_controller.h"
16 #include "content/public/browser/storage_partition.h" 16 #include "content/public/browser/storage_partition.h"
17 #include "content/public/common/content_client.h" 17 #include "content/public/common/content_client.h"
18 #include "content/public/common/page_state.h" 18 #include "content/public/common/page_state.h"
19 #include "content/public/common/web_preferences.h" 19 #include "content/public/common/web_preferences.h"
20 #include "content/test/test_render_frame_host.h" 20 #include "content/test/test_render_frame_host.h"
21 #include "content/test/test_web_contents.h" 21 #include "content/test/test_web_contents.h"
22 #include "media/base/video_frame.h" 22 #include "media/base/video_frame.h"
23 #include "ui/gfx/rect.h" 23 #include "ui/gfx/rect.h"
24 24
25 namespace content { 25 namespace content {
26 26
27 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params, 27 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params,
28 int page_id,
29 const GURL& url, 28 const GURL& url,
30 PageTransition transition) { 29 PageTransition transition) {
31 params->page_id = page_id;
32 params->url = url; 30 params->url = url;
33 params->referrer = Referrer(); 31 params->referrer = Referrer();
34 params->transition = transition; 32 params->transition = transition;
35 params->redirects = std::vector<GURL>(); 33 params->redirects = std::vector<GURL>();
36 params->should_update_history = false; 34 params->should_update_history = false;
37 params->searchable_form_url = GURL(); 35 params->searchable_form_url = GURL();
38 params->searchable_form_encoding = std::string(); 36 params->searchable_form_encoding = std::string();
39 params->security_info = std::string(); 37 params->security_info = std::string();
40 params->gesture = NavigationGestureUser; 38 params->gesture = NavigationGestureUser;
41 params->was_within_same_page = false; 39 params->was_within_same_page = false;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 283 }
286 284
287 void TestRenderViewHost::SendNavigateWithFile( 285 void TestRenderViewHost::SendNavigateWithFile(
288 int page_id, 286 int page_id,
289 const GURL& url, 287 const GURL& url,
290 const base::FilePath& file_path) { 288 const base::FilePath& file_path) {
291 main_render_frame_host_->SendNavigateWithFile(page_id, url, file_path); 289 main_render_frame_host_->SendNavigateWithFile(page_id, url, file_path);
292 } 290 }
293 291
294 void TestRenderViewHost::SendNavigateWithParams( 292 void TestRenderViewHost::SendNavigateWithParams(
293 int page_id,
295 FrameHostMsg_DidCommitProvisionalLoad_Params* params) { 294 FrameHostMsg_DidCommitProvisionalLoad_Params* params) {
296 main_render_frame_host_->SendNavigateWithParams(params); 295 main_render_frame_host_->SendNavigateWithParams(page_id, params);
297 } 296 }
298 297
299 void TestRenderViewHost::SendNavigateWithTransitionAndResponseCode( 298 void TestRenderViewHost::SendNavigateWithTransitionAndResponseCode(
300 int page_id, 299 int page_id,
301 const GURL& url, 300 const GURL& url,
302 PageTransition transition, 301 PageTransition transition,
303 int response_code) { 302 int response_code) {
304 main_render_frame_host_->SendNavigateWithTransitionAndResponseCode( 303 main_render_frame_host_->SendNavigateWithTransitionAndResponseCode(
305 page_id, url, transition, response_code); 304 page_id, url, transition, response_code);
306 } 305 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 393
395 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { 394 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() {
396 return contents()->GetMainFrame(); 395 return contents()->GetMainFrame();
397 } 396 }
398 397
399 TestWebContents* RenderViewHostImplTestHarness::contents() { 398 TestWebContents* RenderViewHostImplTestHarness::contents() {
400 return static_cast<TestWebContents*>(web_contents()); 399 return static_cast<TestWebContents*>(web_contents());
401 } 400 }
402 401
403 } // namespace content 402 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698