chromium/content/test/data/prerender/restriction-gamepad.html

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>

const prerenderingChanged = new Promise(
  resolve => {
    document.addEventListener('prerenderingchange', () => {
      const [_] = navigator.getGamepads();
      resolve(true);
    });
  }
);

</script>
</body>
</html>