OLD | NEW |
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 "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
9 #include "content/common/gpu/image_transport_surface.h" | 10 #include "content/common/gpu/image_transport_surface.h" |
10 #include "content/renderer/render_thread_impl.h" | 11 #include "content/renderer/render_thread_impl.h" |
11 #include "content/renderer/render_view_impl.h" | 12 #include "content/renderer/render_view_impl.h" |
12 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 13 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
13 #include "third_party/WebKit/public/platform/WebGamepads.h" | 14 #include "third_party/WebKit/public/platform/WebGamepads.h" |
14 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web
TestProxy.h" | 15 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web
TestProxy.h" |
15 | 16 |
16 #if defined(OS_WIN) && !defined(USE_AURA) | 17 #if defined(OS_WIN) && !defined(USE_AURA) |
17 #include "content/browser/web_contents/web_contents_drag_win.h" | 18 #include "content/browser/web_contents/web_contents_drag_win.h" |
18 #endif | 19 #endif |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 RenderThreadImpl::current()->set_layout_test_mode(true); | 63 RenderThreadImpl::current()->set_layout_test_mode(true); |
63 } | 64 } |
64 | 65 |
65 void EnableBrowserLayoutTestMode() { | 66 void EnableBrowserLayoutTestMode() { |
66 #if defined(OS_MACOSX) | 67 #if defined(OS_MACOSX) |
67 ImageTransportSurface::SetAllowOSMesaForTesting(true); | 68 ImageTransportSurface::SetAllowOSMesaForTesting(true); |
68 PopupMenuHelper::DontShowPopupMenuForTesting(); | 69 PopupMenuHelper::DontShowPopupMenuForTesting(); |
69 #elif defined(OS_WIN) && !defined(USE_AURA) | 70 #elif defined(OS_WIN) && !defined(USE_AURA) |
70 WebContentsDragWin::DisableDragDropForTesting(); | 71 WebContentsDragWin::DisableDragDropForTesting(); |
71 #endif | 72 #endif |
| 73 RenderWidgetHostImpl::DisableResizeAckCheckForTesting(); |
72 } | 74 } |
73 | 75 |
74 int GetLocalSessionHistoryLength(RenderView* render_view) { | 76 int GetLocalSessionHistoryLength(RenderView* render_view) { |
75 return static_cast<RenderViewImpl*>(render_view) | 77 return static_cast<RenderViewImpl*>(render_view) |
76 ->GetLocalSessionHistoryLengthForTesting(); | 78 ->GetLocalSessionHistoryLengthForTesting(); |
77 } | 79 } |
78 | 80 |
79 void SyncNavigationState(RenderView* render_view) { | 81 void SyncNavigationState(RenderView* render_view) { |
80 static_cast<RenderViewImpl*>(render_view)->SyncNavigationState(); | 82 static_cast<RenderViewImpl*>(render_view)->SyncNavigationState(); |
81 } | 83 } |
(...skipping 23 matching lines...) Expand all Loading... |
105 static_cast<RenderViewImpl*>(render_view) | 107 static_cast<RenderViewImpl*>(render_view) |
106 ->EnableAutoResizeForTesting(min_size, max_size); | 108 ->EnableAutoResizeForTesting(min_size, max_size); |
107 } | 109 } |
108 | 110 |
109 void DisableAutoResizeMode(RenderView* render_view, const WebSize& new_size) { | 111 void DisableAutoResizeMode(RenderView* render_view, const WebSize& new_size) { |
110 static_cast<RenderViewImpl*>(render_view) | 112 static_cast<RenderViewImpl*>(render_view) |
111 ->DisableAutoResizeForTesting(new_size); | 113 ->DisableAutoResizeForTesting(new_size); |
112 } | 114 } |
113 | 115 |
114 } // namespace content | 116 } // namespace content |
OLD | NEW |