chromium/third_party/blink/web_tests/fast/forms/button/button-spacebar-click.html

<html>
<head>
    <script>
    function test() {
        var bt = document.getElementById('bt');
        bt.focus();
        if (window.testRunner) {
            testRunner.dumpAsText();
            eventSender.keyDown(' ');
        }
    }
    function log(msg) {
        var console = document.getElementById('console');
        console.innerHTML = console.innerHTML + msg + "<br>";
    }
    </script>
</head>
<body onload="test()">
    <form onsubmit="log('Test Passed'); return false;">
        This tests that hitting spacebar on the button element simulates a click.<br>
        <button id="bt"></button>
    </form>
    <div id="console"></div>
</body>
</html>