| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Set the device scale factor and force the compositor to resize. | 113 // Set the device scale factor and force the compositor to resize. |
| 114 void SetDeviceScaleFactor(RenderView* render_view, float factor); | 114 void SetDeviceScaleFactor(RenderView* render_view, float factor); |
| 115 | 115 |
| 116 // Set the device color profile associated with the profile |name|. | 116 // Set the device color profile associated with the profile |name|. |
| 117 void SetDeviceColorProfile(RenderView* render_view, const std::string& name); | 117 void SetDeviceColorProfile(RenderView* render_view, const std::string& name); |
| 118 | 118 |
| 119 // Change the bluetooth test adapter while running a layout test. | 119 // Change the bluetooth test adapter while running a layout test. |
| 120 void SetBluetoothAdapter(int render_process_id, | 120 void SetBluetoothAdapter(int render_process_id, |
| 121 scoped_refptr<device::BluetoothAdapter> adapter); | 121 scoped_refptr<device::BluetoothAdapter> adapter); |
| 122 | 122 |
| 123 // Enables mock geofencing service while running a layout test. | |
| 124 // |service_available| indicates if the mock service should mock geofencing | |
| 125 // being available or not. | |
| 126 void SetGeofencingMockProvider(bool service_available); | |
| 127 | |
| 128 // Disables mock geofencing service while running a layout test. | |
| 129 void ClearGeofencingMockProvider(); | |
| 130 | |
| 131 // Set the mock geofencing position while running a layout test. | |
| 132 void SetGeofencingMockPosition(double latitude, double longitude); | |
| 133 | |
| 134 // Enables or disables synchronous resize mode. When enabled, all window-sizing | 123 // Enables or disables synchronous resize mode. When enabled, all window-sizing |
| 135 // machinery is short-circuited inside the renderer. This mode is necessary for | 124 // machinery is short-circuited inside the renderer. This mode is necessary for |
| 136 // some tests that were written before browsers had multi-process architecture | 125 // some tests that were written before browsers had multi-process architecture |
| 137 // and rely on window resizes to happen synchronously. | 126 // and rely on window resizes to happen synchronously. |
| 138 // See http://crbug.com/309760 for details. | 127 // See http://crbug.com/309760 for details. |
| 139 void UseSynchronousResizeMode(RenderView* render_view, bool enable); | 128 void UseSynchronousResizeMode(RenderView* render_view, bool enable); |
| 140 | 129 |
| 141 // Control auto resize mode. | 130 // Control auto resize mode. |
| 142 void EnableAutoResizeMode(RenderView* render_view, | 131 void EnableAutoResizeMode(RenderView* render_view, |
| 143 const blink::WebSize& min_size, | 132 const blink::WebSize& min_size, |
| 144 const blink::WebSize& max_size); | 133 const blink::WebSize& max_size); |
| 145 void DisableAutoResizeMode(RenderView* render_view, | 134 void DisableAutoResizeMode(RenderView* render_view, |
| 146 const blink::WebSize& new_size); | 135 const blink::WebSize& new_size); |
| 147 | 136 |
| 148 // Provides a text dump of the contents of the given page state. | 137 // Provides a text dump of the contents of the given page state. |
| 149 std::string DumpBackForwardList(std::vector<PageState>& page_state, | 138 std::string DumpBackForwardList(std::vector<PageState>& page_state, |
| 150 size_t current_index); | 139 size_t current_index); |
| 151 | 140 |
| 152 // Run all pending idle tasks immediately, and then invoke callback. | 141 // Run all pending idle tasks immediately, and then invoke callback. |
| 153 void SchedulerRunIdleTasks(const base::Closure& callback); | 142 void SchedulerRunIdleTasks(const base::Closure& callback); |
| 154 | 143 |
| 155 } // namespace content | 144 } // namespace content |
| 156 | 145 |
| 157 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 146 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| OLD | NEW |