chromium/third_party/blink/web_tests/fast/events/arrow-navigation.html

<html>
    <head>
        <script>
            function test()
            {
                var tf = document.getElementById('tf');
                tf.focus();
                tf.setSelectionRange(0, 0);
                if (window.testRunner) {
                    testRunner.dumpAsText();
                    eventSender.keyDown("ArrowRight");
                }
                if (tf.selectionStart == 1)
                    log("Test Passed");
                else
                    log("Test Failed.  Selection start: " + tf.selectionStart + " Selection end: " + tf.selectionEnd);
            }
            
            function log(msg)
            {
                var res = document.getElementById('res');
                res.innerHTML = res.innerHTML + msg + "<br>";
            }
        </script>
    </head>
    <body onload="test()">
        This tests that you can use arrow keys to navigate.<br>
        <input id="tf" value="test"></input>
        <div id="res"></div>
    </body>
</html>