summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authorb.kelemen@samsung.com <b.kelemen@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-25 02:20:01 +0000
committerb.kelemen@samsung.com <b.kelemen@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-25 02:20:01 +0000
commit85603cbb309c6d7137ae0a971a8cd0bc12ce0ef9 (patch)
tree16a1b1ec96d4471175250ddf86481b91f4e9edea /content/public
parent07fca47ef8666c567733c4b0d5a0ddd88b6c41a3 (diff)
downloadchromium_src-85603cbb309c6d7137ae0a971a8cd0bc12ce0ef9.zip
chromium_src-85603cbb309c6d7137ae0a971a8cd0bc12ce0ef9.tar.gz
chromium_src-85603cbb309c6d7137ae0a971a8cd0bc12ce0ef9.tar.bz2
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
Diffstat (limited to 'content/public')
-rw-r--r--content/public/test/layouttest_support.h7
1 files changed, 7 insertions, 0 deletions
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);