<input id="input" type="text" value="word another">
<p>Tests option-deleting a word. If the test succeeds, the word "word" should end up with a space after it.</p>
<script>

function sendDeleteWordKey()
{
    var deleteWordModifiers;
    if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
        deleteWordModifiers = ["altKey"];
    else
        deleteWordModifiers = ["ctrlKey"];
    if (window.eventSender)
        eventSender.keyDown(String.fromCharCode(8), deleteWordModifiers);
}

var input = document.getElementById("input");
input.focus();
input.setSelectionRange(12, 12);
sendDeleteWordKey();
</script>
