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

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

Issue 339913002: Move MockScreenOrientationController to content/shell/renderer/test_runner/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { 95 void SetMockDeviceMotionData(const WebDeviceMotionData& data) {
96 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); 96 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data);
97 } 97 }
98 98
99 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { 99 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) {
100 RendererWebKitPlatformSupportImpl:: 100 RendererWebKitPlatformSupportImpl::
101 SetMockDeviceOrientationDataForTesting(data); 101 SetMockDeviceOrientationDataForTesting(data);
102 } 102 }
103 103
104 void SetMockScreenOrientation(
105 RenderView* render_view,
106 const blink::WebScreenOrientationType& orientation) {
107 RendererWebKitPlatformSupportImpl::
108 SetMockScreenOrientationForTesting(render_view, orientation);
109 }
110
111 void ResetMockScreenOrientation()
112 {
113 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting();
114 }
115
116 void MockBatteryStatusChanged(const WebBatteryStatus& status) { 104 void MockBatteryStatusChanged(const WebBatteryStatus& status) {
117 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status); 105 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status);
118 } 106 }
119 107
120 void EnableRendererLayoutTestMode() { 108 void EnableRendererLayoutTestMode() {
121 RenderThreadImpl::current()->set_layout_test_mode(true); 109 RenderThreadImpl::current()->set_layout_test_mode(true);
122 } 110 }
123 111
124 void EnableBrowserLayoutTestMode() { 112 void EnableBrowserLayoutTestMode() {
125 #if defined(OS_MACOSX) 113 #if defined(OS_MACOSX)
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 result.append( 284 result.append(
297 DumpHistoryItem(entry->root_history_node(), 285 DumpHistoryItem(entry->root_history_node(),
298 8, 286 8,
299 index == current_index)); 287 index == current_index));
300 } 288 }
301 result.append("===============================================\n"); 289 result.append("===============================================\n");
302 return result; 290 return result;
303 } 291 }
304 292
305 } // namespace content 293 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698