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

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

Issue 137403005: Remove some code inside USE_AURA and OS_WIN ifdefs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 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 | Annotate | Revision Log
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 "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/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/common/gpu/image_transport_surface.h" 10 #include "content/common/gpu/image_transport_surface.h"
11 #include "content/renderer/render_thread_impl.h" 11 #include "content/renderer/render_thread_impl.h"
12 #include "content/renderer/render_view_impl.h" 12 #include "content/renderer/render_view_impl.h"
13 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 13 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
14 #include "content/shell/renderer/test_runner/WebFrameTestProxy.h" 14 #include "content/shell/renderer/test_runner/WebFrameTestProxy.h"
15 #include "content/shell/renderer/test_runner/WebTestProxy.h" 15 #include "content/shell/renderer/test_runner/WebTestProxy.h"
16 #include "content/test/test_media_stream_client.h" 16 #include "content/test/test_media_stream_client.h"
17 #include "third_party/WebKit/public/platform/WebDeviceMotionData.h" 17 #include "third_party/WebKit/public/platform/WebDeviceMotionData.h"
18 #include "third_party/WebKit/public/platform/WebDeviceOrientationData.h" 18 #include "third_party/WebKit/public/platform/WebDeviceOrientationData.h"
19 #include "third_party/WebKit/public/platform/WebGamepads.h" 19 #include "third_party/WebKit/public/platform/WebGamepads.h"
20 20
21 #if defined(OS_WIN) && !defined(USE_AURA)
22 #include "content/browser/web_contents/web_contents_drag_win.h"
23 #endif
24
25 #if defined(OS_MACOSX) 21 #if defined(OS_MACOSX)
26 #include "content/browser/renderer_host/popup_menu_helper_mac.h" 22 #include "content/browser/renderer_host/popup_menu_helper_mac.h"
27 #endif 23 #endif
28 24
29 using blink::WebDeviceMotionData; 25 using blink::WebDeviceMotionData;
30 using blink::WebDeviceOrientationData; 26 using blink::WebDeviceOrientationData;
31 using blink::WebGamepads; 27 using blink::WebGamepads;
32 using blink::WebRect; 28 using blink::WebRect;
33 using blink::WebSize; 29 using blink::WebSize;
34 using WebTestRunner::WebFrameTestProxy; 30 using WebTestRunner::WebFrameTestProxy;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 92 }
97 93
98 void EnableRendererLayoutTestMode() { 94 void EnableRendererLayoutTestMode() {
99 RenderThreadImpl::current()->set_layout_test_mode(true); 95 RenderThreadImpl::current()->set_layout_test_mode(true);
100 } 96 }
101 97
102 void EnableBrowserLayoutTestMode() { 98 void EnableBrowserLayoutTestMode() {
103 #if defined(OS_MACOSX) 99 #if defined(OS_MACOSX)
104 ImageTransportSurface::SetAllowOSMesaForTesting(true); 100 ImageTransportSurface::SetAllowOSMesaForTesting(true);
105 PopupMenuHelper::DontShowPopupMenuForTesting(); 101 PopupMenuHelper::DontShowPopupMenuForTesting();
106 #elif defined(OS_WIN) && !defined(USE_AURA)
107 WebContentsDragWin::DisableDragDropForTesting();
108 #endif 102 #endif
109 RenderWidgetHostImpl::DisableResizeAckCheckForTesting(); 103 RenderWidgetHostImpl::DisableResizeAckCheckForTesting();
110 } 104 }
111 105
112 int GetLocalSessionHistoryLength(RenderView* render_view) { 106 int GetLocalSessionHistoryLength(RenderView* render_view) {
113 return static_cast<RenderViewImpl*>(render_view)-> 107 return static_cast<RenderViewImpl*>(render_view)->
114 GetLocalSessionHistoryLengthForTesting(); 108 GetLocalSessionHistoryLengthForTesting();
115 } 109 }
116 110
117 void SyncNavigationState(RenderView* render_view) { 111 void SyncNavigationState(RenderView* render_view) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 DisableAutoResizeForTesting(new_size); 146 DisableAutoResizeForTesting(new_size);
153 } 147 }
154 148
155 void UseMockMediaStreams(RenderView* render_view) { 149 void UseMockMediaStreams(RenderView* render_view) {
156 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view); 150 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view);
157 render_view_impl->SetMediaStreamClientForTesting( 151 render_view_impl->SetMediaStreamClientForTesting(
158 new TestMediaStreamClient(render_view_impl)); 152 new TestMediaStreamClient(render_view_impl));
159 } 153 }
160 154
161 } // namespace content 155 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698