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

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

Issue 2648053002: Remove old session history logic. (Closed)
Patch Set: Remove comment. Created 3 years, 11 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
« no previous file with comments | « content/test/layouttest_support.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 <memory> 7 #include <memory>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "cc/surfaces/surface_manager.h" 11 #include "cc/surfaces/surface_manager.h"
12 #include "content/browser/compositor/image_transport_factory.h" 12 #include "content/browser/compositor/image_transport_factory.h"
13 #include "content/browser/compositor/surface_utils.h" 13 #include "content/browser/compositor/surface_utils.h"
14 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 14 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
15 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 15 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
16 #include "content/browser/loader/resource_dispatcher_host_impl.h" 16 #include "content/browser/loader/resource_dispatcher_host_impl.h"
17 #include "content/browser/site_instance_impl.h" 17 #include "content/browser/site_instance_impl.h"
18 #include "content/common/dom_storage/dom_storage_types.h" 18 #include "content/common/dom_storage/dom_storage_types.h"
19 #include "content/common/frame_messages.h" 19 #include "content/common/frame_messages.h"
20 #include "content/common/site_isolation_policy.h"
21 #include "content/common/view_messages.h" 20 #include "content/common/view_messages.h"
22 #include "content/public/browser/browser_context.h" 21 #include "content/public/browser/browser_context.h"
23 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
24 #include "content/public/browser/navigation_controller.h" 23 #include "content/public/browser/navigation_controller.h"
25 #include "content/public/browser/storage_partition.h" 24 #include "content/public/browser/storage_partition.h"
26 #include "content/public/common/content_client.h" 25 #include "content/public/common/content_client.h"
27 #include "content/public/common/page_state.h" 26 #include "content/public/common/page_state.h"
28 #include "content/public/common/web_preferences.h" 27 #include "content/public/common/web_preferences.h"
29 #include "content/test/test_render_frame_host.h" 28 #include "content/test/test_render_frame_host.h"
30 #include "content/test/test_web_contents.h" 29 #include "content/test/test_web_contents.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery; 305 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery;
307 DragEventSourceInfo event_info; 306 DragEventSourceInfo event_info;
308 GetWidget()->OnStartDragging(drop_data, drag_operation, SkBitmap(), 307 GetWidget()->OnStartDragging(drop_data, drag_operation, SkBitmap(),
309 gfx::Vector2d(), event_info); 308 gfx::Vector2d(), event_info);
310 } 309 }
311 310
312 void TestRenderViewHost::TestOnUpdateStateWithFile( 311 void TestRenderViewHost::TestOnUpdateStateWithFile(
313 const base::FilePath& file_path) { 312 const base::FilePath& file_path) {
314 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"), 313 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"),
315 false, "data", &file_path); 314 false, "data", &file_path);
316 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { 315 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state);
317 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state);
318 } else {
319 OnUpdateState(state);
320 }
321 } 316 }
322 317
323 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() { 318 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() {
324 std::vector<ui::ScaleFactor> scale_factors; 319 std::vector<ui::ScaleFactor> scale_factors;
325 scale_factors.push_back(ui::SCALE_FACTOR_100P); 320 scale_factors.push_back(ui::SCALE_FACTOR_100P);
326 scoped_set_supported_scale_factors_.reset( 321 scoped_set_supported_scale_factors_.reset(
327 new ui::test::ScopedSetSupportedScaleFactors(scale_factors)); 322 new ui::test::ScopedSetSupportedScaleFactors(scale_factors));
328 } 323 }
329 324
330 RenderViewHostImplTestHarness::~RenderViewHostImplTestHarness() { 325 RenderViewHostImplTestHarness::~RenderViewHostImplTestHarness() {
(...skipping 15 matching lines...) Expand all
346 341
347 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { 342 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() {
348 return contents()->GetMainFrame(); 343 return contents()->GetMainFrame();
349 } 344 }
350 345
351 TestWebContents* RenderViewHostImplTestHarness::contents() { 346 TestWebContents* RenderViewHostImplTestHarness::contents() {
352 return static_cast<TestWebContents*>(web_contents()); 347 return static_cast<TestWebContents*>(web_contents());
353 } 348 }
354 349
355 } // namespace content 350 } // namespace content
OLDNEW
« no previous file with comments | « content/test/layouttest_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698