<!DOCTYPE html>
<script src="../include.js"></script>
<script src="gamepad-helper.js"></script>
<script>
    asyncTest(async (done) => {
        const gamepad = internals.connectVirtualGamepad();
        await handleSDLInputEvents();
        listenForGamepadConnected();

        println(`Before pressing button in top level: ${getStringifiedGamepads()}`);
        gamepad.setButton(gamepad.buttons[0], true);
        await handleSDLInputEvents();
        println(`After pressing button in top level: ${getString