Repository navigation
Description
Description
This proposal seeks to continue the investigation into automated testing for the Gamepad API, building on the Virtual Gamepad Control framework. Previous efforts in 2025 defined initial testing processes. While the 2026 Interop proposal was not accepted, working group discussions identified detailed requirements for Gamepad API automation. We now propose a concrete implementation through collaboration with browser teams to establish a foundational test suite.
Tasks:
- Allow a WPT to create a virtual gamepad with controlled static properties and a browsing-context scope.
- Model gamepad input as an Actions input source, so it composes with other WebDriver input sources and has explicit tick ordering.
- Support axes, buttons (including independent pressed/touched sensors), touch surfaces, and advertised vibration effects in the device description.
- Allow a WPT to disconnect the gamepad and clean it up.
Rationale
The Gamepad API is an essential input mode for web gaming applications – critically important for platforms like NVIDIA GeForce NOW Cloud Gaming and, indeed, for the player experience. Because browser architectures are constantly evolving, regressions can still slip through on APIs that major production platforms rely on daily. This underscores the urgent need for robust automated testing.
Currently, the lack of such testing presents a significant challenge. Most gamepad behavior relies on manual testing due to the API’s inability to natively connect a gamepad or generate realistic axis and button input. While existing browser test infrastructure utilizes mock-gamepad implementations, these are typically tied to engine-specific test APIs – limiting them primarily to unit testing.
Recent Gamepad Issues:
- [WebKit] iPad Gamepad API compatibility issue in Fullscreen mode
- [WebKit] GTK/WPE Gamepad vibration values were passed in the wrong format
- [WebKit] Extended controllers without a Home button exposed the wrong button layout
- [Chromium] Bumper presses started being intercepted as browser-first tab switches before reaching web pages
- [Chromium] DualSense controllers on Android 12+ were labelled as nonstandard
- [Chromium] Windows could enumerate one controller twice
We are proposing to implement portable, automated WPT coverage for critical aspects such as gamepad connection/disconnection, input values, timestamps, visibility, user activation, and haptics, directly addressing real-world use cases. Tracking a concerning regression in WebKit and Chromium projects regarding this space, we believe that adopting automated tests will significantly reduce the likelihood of future issues.
Investigation Roadmap
Timeline:
Q1–Q2 2027: WebKit & Chromium Implement automation interfaces and create initial automated tests.
Q3 2027: Validate tests across major browsers; refine based on feedback.
Q4 2027: Document remaining gaps and ambiguities; prepare for potential future focus area proposal.
Detailed plan:
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity