| 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 "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 | 9 |
| 10 namespace WebKit { | 10 namespace WebKit { |
| 11 class WebDeviceMotionListener; |
| 11 class WebGamepads; | 12 class WebGamepads; |
| 12 struct WebSize; | 13 struct WebSize; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace WebTestRunner { | 16 namespace WebTestRunner { |
| 16 class WebTestProxyBase; | 17 class WebTestProxyBase; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 class RenderView; | 22 class RenderView; |
| 22 | 23 |
| 23 // Enable injecting of a WebTestProxy between WebViews and RenderViews. | 24 // Enable injecting of a WebTestProxy between WebViews and RenderViews. |
| 24 // |callback| is invoked with a pointer to WebTestProxyBase for each created | 25 // |callback| is invoked with a pointer to WebTestProxyBase for each created |
| 25 // WebTestProxy. | 26 // WebTestProxy. |
| 26 void EnableWebTestProxyCreation(const base::Callback< | 27 void EnableWebTestProxyCreation(const base::Callback< |
| 27 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback); | 28 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback); |
| 28 | 29 |
| 29 // Sets the WebGamepads that should be returned by | 30 // Sets the WebGamepads that should be returned by |
| 30 // WebKitPlatformSupport::sampleGamepads(). | 31 // WebKitPlatformSupport::sampleGamepads(). |
| 31 void SetMockGamepads(const WebKit::WebGamepads& pads); | 32 void SetMockGamepads(const WebKit::WebGamepads& pads); |
| 32 | 33 |
| 34 // Sets the WebDeviceMotionListener that should be used when registering |
| 35 // a listener through WebKitPlatformSupport::setDeviceMotionListener(). |
| 36 void SetMockDeviceMotionListener(WebKit::WebDeviceMotionListener* listener); |
| 37 |
| 33 // Disable logging to the console from the appcache system. | 38 // Disable logging to the console from the appcache system. |
| 34 void DisableAppCacheLogging(); | 39 void DisableAppCacheLogging(); |
| 35 | 40 |
| 36 // Enable testing support in the devtools client. | 41 // Enable testing support in the devtools client. |
| 37 void EnableDevToolsFrontendTesting(); | 42 void EnableDevToolsFrontendTesting(); |
| 38 | 43 |
| 39 // Returns the length of the local session history of a render view. | 44 // Returns the length of the local session history of a render view. |
| 40 int GetLocalSessionHistoryLength(RenderView* render_view); | 45 int GetLocalSessionHistoryLength(RenderView* render_view); |
| 41 | 46 |
| 42 void SetAllowOSMesaImageTransportForTesting(); | 47 void SetAllowOSMesaImageTransportForTesting(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 68 | 73 |
| 69 // Disable system calls related to drag & drop. | 74 // Disable system calls related to drag & drop. |
| 70 void DisableSystemDragDrop(); | 75 void DisableSystemDragDrop(); |
| 71 | 76 |
| 72 // Don't show modal popup menus. | 77 // Don't show modal popup menus. |
| 73 void DisableModalPopupMenus(); | 78 void DisableModalPopupMenus(); |
| 74 | 79 |
| 75 } // namespace content | 80 } // namespace content |
| 76 | 81 |
| 77 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 82 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| OLD | NEW |