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

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

Issue 2648053002: Remove old session history logic. (Closed)
Patch Set: Remove policy function Created 3 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
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/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "cc/output/copy_output_request.h" 16 #include "cc/output/copy_output_request.h"
17 #include "cc/test/pixel_test_output_surface.h" 17 #include "cc/test/pixel_test_output_surface.h"
18 #include "cc/test/test_compositor_frame_sink.h" 18 #include "cc/test/test_compositor_frame_sink.h"
19 #include "components/test_runner/test_common.h" 19 #include "components/test_runner/test_common.h"
20 #include "components/test_runner/web_frame_test_proxy.h" 20 #include "components/test_runner/web_frame_test_proxy.h"
21 #include "components/test_runner/web_view_test_proxy.h" 21 #include "components/test_runner/web_view_test_proxy.h"
22 #include "components/test_runner/web_widget_test_proxy.h" 22 #include "components/test_runner/web_widget_test_proxy.h"
23 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" 23 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h"
24 #include "content/browser/renderer_host/render_process_host_impl.h" 24 #include "content/browser/renderer_host/render_process_host_impl.h"
25 #include "content/browser/renderer_host/render_widget_host_impl.h" 25 #include "content/browser/renderer_host/render_widget_host_impl.h"
26 #include "content/common/renderer.mojom.h" 26 #include "content/common/renderer.mojom.h"
27 #include "content/common/site_isolation_policy.h"
28 #include "content/public/common/page_state.h" 27 #include "content/public/common/page_state.h"
29 #include "content/public/common/screen_info.h" 28 #include "content/public/common/screen_info.h"
30 #include "content/public/renderer/renderer_gamepad_provider.h" 29 #include "content/public/renderer/renderer_gamepad_provider.h"
31 #include "content/renderer/fetchers/manifest_fetcher.h" 30 #include "content/renderer/fetchers/manifest_fetcher.h"
32 #include "content/renderer/gpu/render_widget_compositor.h" 31 #include "content/renderer/gpu/render_widget_compositor.h"
33 #include "content/renderer/history_entry.h" 32 #include "content/renderer/history_entry.h"
34 #include "content/renderer/history_serialization.h" 33 #include "content/renderer/history_serialization.h"
35 #include "content/renderer/input/render_widget_input_handler_delegate.h" 34 #include "content/renderer/input/render_widget_input_handler_delegate.h"
36 #include "content/renderer/layout_test_dependencies.h" 35 #include "content/renderer/layout_test_dependencies.h"
37 #include "content/renderer/render_frame_impl.h" 36 #include "content/renderer/render_frame_impl.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 RenderWidgetHostImpl::DisableResizeAckCheckForTesting(); 450 RenderWidgetHostImpl::DisableResizeAckCheckForTesting();
452 } 451 }
453 452
454 int GetLocalSessionHistoryLength(RenderView* render_view) { 453 int GetLocalSessionHistoryLength(RenderView* render_view) {
455 return static_cast<RenderViewImpl*>(render_view)-> 454 return static_cast<RenderViewImpl*>(render_view)->
456 GetLocalSessionHistoryLengthForTesting(); 455 GetLocalSessionHistoryLengthForTesting();
457 } 456 }
458 457
459 void SyncNavigationState(RenderView* render_view) { 458 void SyncNavigationState(RenderView* render_view) {
460 // TODO(creis): Add support for testing in OOPIF-enabled modes. 459 // TODO(creis): Add support for testing in OOPIF-enabled modes.
461 // See https://crbug.com/477150. 460 // See https://crbug.com/477150.
Charlie Reis 2017/01/24 17:34:24 There's lots of layout tests that use dumpBackForw
nasko 2017/01/26 00:56:20 sgtm
462 if (SiteIsolationPolicy::UseSubframeNavigationEntries())
463 return;
464 static_cast<RenderViewImpl*>(render_view)->SendUpdateState();
465 } 461 }
466 462
467 void SetFocusAndActivate(RenderView* render_view, bool enable) { 463 void SetFocusAndActivate(RenderView* render_view, bool enable) {
468 static_cast<RenderViewImpl*>(render_view)-> 464 static_cast<RenderViewImpl*>(render_view)->
469 SetFocusAndActivateForTesting(enable); 465 SetFocusAndActivateForTesting(enable);
470 } 466 }
471 467
472 void ForceResizeRenderView(RenderView* render_view, 468 void ForceResizeRenderView(RenderView* render_view,
473 const WebSize& new_size) { 469 const WebSize& new_size) {
474 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view); 470 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 } 598 }
603 599
604 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { 600 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) {
605 if (auto* render_widget = 601 if (auto* render_widget =
606 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { 602 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) {
607 render_widget->ShowVirtualKeyboard(); 603 render_widget->ShowVirtualKeyboard();
608 } 604 }
609 } 605 }
610 606
611 } // namespace content 607 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698