| 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 #ifndef CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| 6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class WebWidget; | 26 class WebWidget; |
| 27 class WebURLResponse; | 27 class WebURLResponse; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace device { | 30 namespace device { |
| 31 class MotionData; | 31 class MotionData; |
| 32 class OrientationData; | 32 class OrientationData; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace gfx { | 35 namespace gfx { |
| 36 class ICCProfile; | 36 class ColorSpace; |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace test_runner { | 39 namespace test_runner { |
| 40 class WebFrameTestProxyBase; | 40 class WebFrameTestProxyBase; |
| 41 class WebViewTestProxyBase; | 41 class WebViewTestProxyBase; |
| 42 class WebWidgetTestProxyBase; | 42 class WebWidgetTestProxyBase; |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace content { | 45 namespace content { |
| 46 | 46 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 float GetWindowToViewportScale(RenderView* render_view); | 137 float GetWindowToViewportScale(RenderView* render_view); |
| 138 | 138 |
| 139 // Converts |event| from screen coordinates to coordinates used by the widget | 139 // Converts |event| from screen coordinates to coordinates used by the widget |
| 140 // associated with the |web_widget_test_proxy_base|. Returns nullptr if no | 140 // associated with the |web_widget_test_proxy_base|. Returns nullptr if no |
| 141 // transformation was necessary (e.g. for a keyboard event OR if widget requires | 141 // transformation was necessary (e.g. for a keyboard event OR if widget requires |
| 142 // no scaling and has coordinates starting at (0,0)). | 142 // no scaling and has coordinates starting at (0,0)). |
| 143 std::unique_ptr<blink::WebInputEvent> TransformScreenToWidgetCoordinates( | 143 std::unique_ptr<blink::WebInputEvent> TransformScreenToWidgetCoordinates( |
| 144 test_runner::WebWidgetTestProxyBase* web_widget_test_proxy_base, | 144 test_runner::WebWidgetTestProxyBase* web_widget_test_proxy_base, |
| 145 const blink::WebInputEvent& event); | 145 const blink::WebInputEvent& event); |
| 146 | 146 |
| 147 // Get the ICC profile for a given name string. This is not in the ICCProfile | 147 // Get the color space for a given name string. This is not in the ColorSpace |
| 148 // class to avoid bloating the shipping build. | 148 // class to avoid bloating the shipping build. |
| 149 gfx::ICCProfile GetTestingICCProfile(const std::string& name); | 149 gfx::ColorSpace GetTestingColorSpace(const std::string& name); |
| 150 | 150 |
| 151 // Set the device color profile associated with the profile |name|. | 151 // Set the device color space. |
| 152 void SetDeviceColorProfile( | 152 void SetDeviceColorSpace(RenderView* render_view, |
| 153 RenderView* render_view, const gfx::ICCProfile& icc_profile); | 153 const gfx::ColorSpace& color_space); |
| 154 | 154 |
| 155 // Sets the scan duration to 0. | 155 // Sets the scan duration to 0. |
| 156 void SetTestBluetoothScanDuration(); | 156 void SetTestBluetoothScanDuration(); |
| 157 | 157 |
| 158 // Enables or disables synchronous resize mode. When enabled, all window-sizing | 158 // Enables or disables synchronous resize mode. When enabled, all window-sizing |
| 159 // machinery is short-circuited inside the renderer. This mode is necessary for | 159 // machinery is short-circuited inside the renderer. This mode is necessary for |
| 160 // some tests that were written before browsers had multi-process architecture | 160 // some tests that were written before browsers had multi-process architecture |
| 161 // and rely on window resizes to happen synchronously. | 161 // and rely on window resizes to happen synchronously. |
| 162 // See http://crbug.com/309760 for details. | 162 // See http://crbug.com/309760 for details. |
| 163 void UseSynchronousResizeMode(RenderView* render_view, bool enable); | 163 void UseSynchronousResizeMode(RenderView* render_view, bool enable); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 181 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* render_frame); | 181 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* render_frame); |
| 182 | 182 |
| 183 // PlzNavigate | 183 // PlzNavigate |
| 184 // Returns true if the navigation identified by the |request| was initiated by | 184 // Returns true if the navigation identified by the |request| was initiated by |
| 185 // the browser or renderer. | 185 // the browser or renderer. |
| 186 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request); | 186 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request); |
| 187 | 187 |
| 188 } // namespace content | 188 } // namespace content |
| 189 | 189 |
| 190 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 190 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| OLD | NEW |