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