From 85603cbb309c6d7137ae0a971a8cd0bc12ce0ef9 Mon Sep 17 00:00:00 2001 From: "b.kelemen@samsung.com" Date: Tue, 25 Mar 2014 02:20:01 +0000 Subject: Gamepad API: add test support for gamepad events This CL adds layout test support for 'gamepadconnected' and 'gamepaddidconnected' events. BUG=344556 Review URL: https://codereview.chromium.org/207323002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259102 0039d316-1c4b-4281-b951-d872f2087c98 --- content/public/test/layouttest_support.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'content/public') diff --git a/content/public/test/layouttest_support.h b/content/public/test/layouttest_support.h index 370a6e4..6c7e847 100644 --- a/content/public/test/layouttest_support.h +++ b/content/public/test/layouttest_support.h @@ -11,6 +11,7 @@ namespace blink { class WebDeviceMotionData; class WebDeviceOrientationData; +class WebGamepad; class WebGamepads; struct WebSize; } @@ -42,6 +43,12 @@ void EnableWebTestProxyCreation(const base::Callback< // WebKitPlatformSupport::sampleGamepads(). void SetMockGamepads(const blink::WebGamepads& pads); +// Notifies blink about a new gamepad. +void MockGamepadConnected(int index, const blink::WebGamepad& pad); + +// Notifies blink that a gamepad has been disconnected. +void MockGamepadDisconnected(int index, const blink::WebGamepad& pad); + // Sets WebDeviceMotionData that should be used when registering // a listener through WebKitPlatformSupport::setDeviceMotionListener(). void SetMockDeviceMotionData(const blink::WebDeviceMotionData& data); -- cgit v1.1