chromium/third_party/blink/web_tests/external/wpt/gamepad/feature-policy-gamepad.html

<script>
  try {
    const test = navigator.getGamepads();
    if (test) window.parent.postMessage({ enabled: true }, "*");
  } catch (err) {
    window.parent.postMessage({ enabled: false }, "*");
  }
</script>