Gamepad API automated testing by the Virtual Gamepad Control
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
Research direction
The issue describes a multi-quarter roadmap for implementing a virtual gamepad control for automated WPT tests. Start by reading the linked proposal at https://github.com/xingri/xingri.github.io/blob/master/gamepad-interop/proposal-2027.md and the previous interop efforts. The work involves designing and implementing a new automation interface that integrates with WebDriver's Actions input source. 'Done' means a working prototype in WebKit and Chromium and a foundational test suite.
Written by the indexing model from the issue text.
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:
- Dominant language
- JavaScript
- Stars
- 591
- Forks
- 39
- Avg merge
- 3h 8m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from web-platform-tests/interop
-
focus-area-proposal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
web-platform-tests/interop#1363 · 2 comments · 32 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
web-platform-tests/interop#1362 · 1 comment · 5 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
web-platform-tests/interop#1267 · 5 comments · 2 reactions ·
-
meta
Difficulty 1/5 Under an hour Newbie friendliness 62/100
web-platform-tests/interop#931 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
web-platform-tests/interop#1522 ·
All issues in web-platform-tests/interop
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
web-platform-tests/wpt#65844 ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Kanevry/session-orchestrator#108 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
awesomemotive/all-in-one-seo-pack#3238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
andromarces/agent-loops#2055 ·
Maintainers usually reply within 1 day