OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 callback) = 0; | 178 callback) = 0; |
179 | 179 |
180 // Calls the BluetoothChooser::EventHandler with the arguments here. Valid | 180 // Calls the BluetoothChooser::EventHandler with the arguments here. Valid |
181 // event strings are: | 181 // event strings are: |
182 // * "cancel" - simulates the user canceling the chooser. | 182 // * "cancel" - simulates the user canceling the chooser. |
183 // * "select" - simulates the user selecting a device whose device ID is in | 183 // * "select" - simulates the user selecting a device whose device ID is in |
184 // |argument|. | 184 // |argument|. |
185 virtual void SendBluetoothManualChooserEvent(const std::string& event, | 185 virtual void SendBluetoothManualChooserEvent(const std::string& event, |
186 const std::string& argument) = 0; | 186 const std::string& argument) = 0; |
187 | 187 |
188 // Enables mock geofencing service while running a layout test. | |
189 // |service_available| indicates if the mock service should mock geofencing | |
190 // being available or not. | |
191 virtual void SetGeofencingMockProvider(bool service_available) = 0; | |
192 | |
193 // Disables mock geofencing service while running a layout test. | |
194 virtual void ClearGeofencingMockProvider() = 0; | |
195 | |
196 // Set the mock geofencing position while running a layout test. | |
197 virtual void SetGeofencingMockPosition(double latitude, double longitude) = 0; | |
198 | |
199 // Controls which WebView should be focused. | 188 // Controls which WebView should be focused. |
200 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; | 189 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; |
201 | 190 |
202 // Controls whether all cookies should be accepted or writing cookies in a | 191 // Controls whether all cookies should be accepted or writing cookies in a |
203 // third-party context is blocked. | 192 // third-party context is blocked. |
204 virtual void SetAcceptAllCookies(bool accept) = 0; | 193 virtual void SetAcceptAllCookies(bool accept) = 0; |
205 | 194 |
206 // The same as RewriteLayoutTestsURL unless the resource is a path starting | 195 // The same as RewriteLayoutTestsURL unless the resource is a path starting |
207 // with /tmp/, then return a file URL to a temporary file. | 196 // with /tmp/, then return a file URL to a temporary file. |
208 virtual std::string PathToLocalResource(const std::string& resource) = 0; | 197 virtual std::string PathToLocalResource(const std::string& resource) = 0; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 264 |
276 virtual float GetDeviceScaleFactorForTest() const = 0; | 265 virtual float GetDeviceScaleFactorForTest() const = 0; |
277 | 266 |
278 // Run all pending idle tasks, and then run callback. | 267 // Run all pending idle tasks, and then run callback. |
279 virtual void RunIdleTasks(const base::Closure& callback) = 0; | 268 virtual void RunIdleTasks(const base::Closure& callback) = 0; |
280 }; | 269 }; |
281 | 270 |
282 } // namespace test_runner | 271 } // namespace test_runner |
283 | 272 |
284 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 273 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
OLD | NEW |