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

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

Issue 302553007: Call RenderViewImpl::SetScreenOrientationForTesting to make sure that events are not sent when orie… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now ResetMockScreenOrientationForTesting() is called on every layout test finish, so replaced DCHEC… 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
« no previous file with comments | « content/renderer/screen_orientation/mock_screen_orientation_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 104 void SetMockScreenOrientation(
105 RenderView* render_view, 105 RenderView* render_view,
106 const blink::WebScreenOrientationType& orientation) { 106 const blink::WebScreenOrientationType& orientation) {
107 static_cast<RenderViewImpl*>(render_view)
108 ->SetScreenOrientationForTesting(orientation);
109 // FIXME(ostap): Remove this when blink side gets updated.
110 RendererWebKitPlatformSupportImpl:: 107 RendererWebKitPlatformSupportImpl::
111 SetMockScreenOrientationForTesting(orientation); 108 SetMockScreenOrientationForTesting(render_view, orientation);
112 } 109 }
113 110
114 void ResetMockScreenOrientation() 111 void ResetMockScreenOrientation()
115 { 112 {
116 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting(); 113 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting();
117 } 114 }
118 115
119 void MockBatteryStatusChanged(const WebBatteryStatus& status) { 116 void MockBatteryStatusChanged(const WebBatteryStatus& status) {
120 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status); 117 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status);
121 } 118 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 result.append( 296 result.append(
300 DumpHistoryItem(entry->root_history_node(), 297 DumpHistoryItem(entry->root_history_node(),
301 8, 298 8,
302 index == current_index)); 299 index == current_index));
303 } 300 }
304 result.append("===============================================\n"); 301 result.append("===============================================\n");
305 return result; 302 return result;
306 } 303 }
307 304
308 } // namespace content 305 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/screen_orientation/mock_screen_orientation_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698