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

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

Issue 172063002: Unify frame IDs with RenderFrameHost routing IDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix type Created 6 years, 10 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 | « content/renderer/render_view_impl.cc ('k') | 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/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/test/test_backing_store.h" 19 #include "content/test/test_backing_store.h"
20 #include "content/test/test_web_contents.h" 20 #include "content/test/test_web_contents.h"
21 #include "media/base/video_frame.h" 21 #include "media/base/video_frame.h"
22 #include "ui/gfx/rect.h" 22 #include "ui/gfx/rect.h"
23 #include "webkit/common/webpreferences.h" 23 #include "webkit/common/webpreferences.h"
24 24
25 namespace content { 25 namespace content {
26 26
27 namespace {
28
29 const int64 kFrameId = 13UL;
30
31 } // namespace
32
33
34 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params, 27 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params,
35 int page_id, 28 int page_id,
36 const GURL& url, 29 const GURL& url,
37 PageTransition transition) { 30 PageTransition transition) {
38 params->page_id = page_id; 31 params->page_id = page_id;
39 params->url = url; 32 params->url = url;
40 params->referrer = Referrer(); 33 params->referrer = Referrer();
41 params->transition = transition; 34 params->transition = transition;
42 params->redirects = std::vector<GURL>(); 35 params->redirects = std::vector<GURL>();
43 params->should_update_history = false; 36 params->should_update_history = false;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 delete_counter_(NULL), 237 delete_counter_(NULL),
245 simulate_fetch_via_proxy_(false), 238 simulate_fetch_via_proxy_(false),
246 simulate_history_list_was_cleared_(false), 239 simulate_history_list_was_cleared_(false),
247 contents_mime_type_("text/html"), 240 contents_mime_type_("text/html"),
248 opener_route_id_(MSG_ROUTING_NONE), 241 opener_route_id_(MSG_ROUTING_NONE),
249 main_render_frame_host_(NULL) { 242 main_render_frame_host_(NULL) {
250 // TestRenderWidgetHostView installs itself into this->view_ in its 243 // TestRenderWidgetHostView installs itself into this->view_ in its
251 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is 244 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is
252 // called. 245 // called.
253 new TestRenderWidgetHostView(this); 246 new TestRenderWidgetHostView(this);
254
255 main_frame_id_ = kFrameId;
256 } 247 }
257 248
258 TestRenderViewHost::~TestRenderViewHost() { 249 TestRenderViewHost::~TestRenderViewHost() {
259 if (delete_counter_) 250 if (delete_counter_)
260 ++*delete_counter_; 251 ++*delete_counter_;
261 } 252 }
262 253
263 bool TestRenderViewHost::CreateRenderView( 254 bool TestRenderViewHost::CreateRenderView(
264 const base::string16& frame_name, 255 const base::string16& frame_name,
265 int opener_route_id, 256 int opener_route_id,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 395
405 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { 396 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() {
406 return static_cast<TestRenderFrameHost*>(main_rfh()); 397 return static_cast<TestRenderFrameHost*>(main_rfh());
407 } 398 }
408 399
409 TestWebContents* RenderViewHostImplTestHarness::contents() { 400 TestWebContents* RenderViewHostImplTestHarness::contents() {
410 return static_cast<TestWebContents*>(web_contents()); 401 return static_cast<TestWebContents*>(web_contents());
411 } 402 }
412 403
413 } // namespace content 404 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698