Chromium Code Reviews

Unified Diff: content/test/layouttest_support.cc

Issue 207323002: Gamepad API: add test support for gamepad events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 9734a224371429639c8e058e82aa35f009c75f7f..9d27ced42f60a03b7b338725502733233c4e38e1 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -24,6 +24,7 @@
using blink::WebDeviceMotionData;
using blink::WebDeviceOrientationData;
+using blink::WebGamepad;
using blink::WebGamepads;
using blink::WebRect;
using blink::WebSize;
@@ -82,6 +83,14 @@ void SetMockGamepads(const WebGamepads& pads) {
RendererWebKitPlatformSupportImpl::SetMockGamepadsForTesting(pads);
}
+void MockGamepadConnected(int index, const WebGamepad& pad) {
+ RendererWebKitPlatformSupportImpl::MockGamepadConnected(index, pad);
+}
+
+void MockGamepadDisconnected(int index, const WebGamepad& pad) {
+ RendererWebKitPlatformSupportImpl::MockGamepadDisconnected(index, pad);
+}
+
void SetMockDeviceMotionData(const WebDeviceMotionData& data) {
RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data);
}

Powered by Google App Engine