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

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

Issue 284583003: Use WebScreenInfo members to provide screen orientation information for layout test support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed formatting. Created 6 years, 7 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 "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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { 96 void SetMockDeviceMotionData(const WebDeviceMotionData& data) {
97 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); 97 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data);
98 } 98 }
99 99
100 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { 100 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) {
101 RendererWebKitPlatformSupportImpl:: 101 RendererWebKitPlatformSupportImpl::
102 SetMockDeviceOrientationDataForTesting(data); 102 SetMockDeviceOrientationDataForTesting(data);
103 } 103 }
104 104
105 void SetMockScreenOrientation( 105 void SetMockScreenOrientation(
106 RenderView* render_view,
106 const blink::WebScreenOrientationType& orientation) { 107 const blink::WebScreenOrientationType& orientation) {
108 static_cast<RenderViewImpl*>(render_view)
109 ->SetScreenOrientationForTesting(orientation);
110 // FIXME(ostap): Remove this when blink side gets updated.
107 RendererWebKitPlatformSupportImpl:: 111 RendererWebKitPlatformSupportImpl::
108 SetMockScreenOrientationForTesting(orientation); 112 SetMockScreenOrientationForTesting(orientation);
109 } 113 }
110 114
111 void EnableRendererLayoutTestMode() { 115 void EnableRendererLayoutTestMode() {
112 RenderThreadImpl::current()->set_layout_test_mode(true); 116 RenderThreadImpl::current()->set_layout_test_mode(true);
113 } 117 }
114 118
115 void EnableBrowserLayoutTestMode() { 119 void EnableBrowserLayoutTestMode() {
116 #if defined(OS_MACOSX) 120 #if defined(OS_MACOSX)
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 result.append( 299 result.append(
296 DumpHistoryItem(entry->root_history_node(), 300 DumpHistoryItem(entry->root_history_node(),
297 8, 301 8,
298 index == current_index)); 302 index == current_index));
299 } 303 }
300 result.append("===============================================\n"); 304 result.append("===============================================\n");
301 return result; 305 return result;
302 } 306 }
303 307
304 } // namespace content 308 } // namespace content
OLDNEW
« content/renderer/render_view_impl.cc ('K') | « content/shell/renderer/webkit_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698