Gamepad API automated testing by the Virtual Gamepad Control

Aperta
#1,454 0 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
api, game-dev, testing

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

investigation-effort-proposal
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:

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:

Lingua principale
JavaScript
Stelle
591
Fork
39
Merge medio
3h 8m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di web-platform-tests/interop

Tutte le issue di web-platform-tests/interop

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.