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 struct WebSize; | 26 struct WebSize; |
27 class WebView; | 27 class WebView; |
28 class WebWidget; | 28 class WebWidget; |
29 class WebURLResponse; | 29 class WebURLResponse; |
30 } | 30 } |
31 | 31 |
32 namespace device { | 32 namespace device { |
33 class BluetoothAdapter; | 33 class BluetoothAdapter; |
34 } | 34 } |
35 | 35 |
| 36 namespace gfx { |
| 37 class ICCProfile; |
| 38 } |
| 39 |
36 namespace test_runner { | 40 namespace test_runner { |
37 class WebFrameTestProxyBase; | 41 class WebFrameTestProxyBase; |
38 class WebViewTestProxyBase; | 42 class WebViewTestProxyBase; |
39 class WebWidgetTestProxyBase; | 43 class WebWidgetTestProxyBase; |
40 } | 44 } |
41 | 45 |
42 namespace content { | 46 namespace content { |
43 | 47 |
44 class PageState; | 48 class PageState; |
45 class RenderFrame; | 49 class RenderFrame; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Changes the window rect of the given render view. | 124 // Changes the window rect of the given render view. |
121 void ForceResizeRenderView(RenderView* render_view, | 125 void ForceResizeRenderView(RenderView* render_view, |
122 const blink::WebSize& new_size); | 126 const blink::WebSize& new_size); |
123 | 127 |
124 // Set the device scale factor and force the compositor to resize. | 128 // Set the device scale factor and force the compositor to resize. |
125 void SetDeviceScaleFactor(RenderView* render_view, float factor); | 129 void SetDeviceScaleFactor(RenderView* render_view, float factor); |
126 | 130 |
127 // Get the window to viewport scale. | 131 // Get the window to viewport scale. |
128 float GetWindowToViewportScale(RenderView* render_view); | 132 float GetWindowToViewportScale(RenderView* render_view); |
129 | 133 |
| 134 // Get the ICC profile for a given name string. This is not in the ICCProfile |
| 135 // class to avoid bloating the shipping build. |
| 136 gfx::ICCProfile GetTestingICCProfile(const std::string& name); |
| 137 |
130 // Set the device color profile associated with the profile |name|. | 138 // Set the device color profile associated with the profile |name|. |
131 void SetDeviceColorProfile(RenderView* render_view, const std::string& name); | 139 void SetDeviceColorProfile( |
| 140 RenderView* render_view, const gfx::ICCProfile& icc_profile); |
132 | 141 |
133 // Sets the scan duration to 0. | 142 // Sets the scan duration to 0. |
134 void SetTestBluetoothScanDuration(); | 143 void SetTestBluetoothScanDuration(); |
135 | 144 |
136 // Enables or disables synchronous resize mode. When enabled, all window-sizing | 145 // Enables or disables synchronous resize mode. When enabled, all window-sizing |
137 // machinery is short-circuited inside the renderer. This mode is necessary for | 146 // machinery is short-circuited inside the renderer. This mode is necessary for |
138 // some tests that were written before browsers had multi-process architecture | 147 // some tests that were written before browsers had multi-process architecture |
139 // and rely on window resizes to happen synchronously. | 148 // and rely on window resizes to happen synchronously. |
140 // See http://crbug.com/309760 for details. | 149 // See http://crbug.com/309760 for details. |
141 void UseSynchronousResizeMode(RenderView* render_view, bool enable); | 150 void UseSynchronousResizeMode(RenderView* render_view, bool enable); |
142 | 151 |
143 // Control auto resize mode. | 152 // Control auto resize mode. |
144 void EnableAutoResizeMode(RenderView* render_view, | 153 void EnableAutoResizeMode(RenderView* render_view, |
145 const blink::WebSize& min_size, | 154 const blink::WebSize& min_size, |
146 const blink::WebSize& max_size); | 155 const blink::WebSize& max_size); |
147 void DisableAutoResizeMode(RenderView* render_view, | 156 void DisableAutoResizeMode(RenderView* render_view, |
148 const blink::WebSize& new_size); | 157 const blink::WebSize& new_size); |
149 | 158 |
150 // Provides a text dump of the contents of the given page state. | 159 // Provides a text dump of the contents of the given page state. |
151 std::string DumpBackForwardList(std::vector<PageState>& page_state, | 160 std::string DumpBackForwardList(std::vector<PageState>& page_state, |
152 size_t current_index); | 161 size_t current_index); |
153 | 162 |
154 // Run all pending idle tasks immediately, and then invoke callback. | 163 // Run all pending idle tasks immediately, and then invoke callback. |
155 void SchedulerRunIdleTasks(const base::Closure& callback); | 164 void SchedulerRunIdleTasks(const base::Closure& callback); |
156 | 165 |
157 } // namespace content | 166 } // namespace content |
158 | 167 |
159 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 168 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
OLD | NEW |