<html> 
<head>

<style>
.editing { 
    border: 2px solid red; 
    padding: 12px; 
    font-size: 24px; 
}
</style>
<script src=../../editing.js language="JavaScript" type="text/JavaScript" ></script>

<script>

function editingTest() {
    typeCharacterCommand('t');
    typeCharacterCommand('h');
    typeCharacterCommand('e');
    typeCharacterCommand(' ');
    typeCharacterCommand('n');
    typeCharacterCommand('o');
    typeCharacterCommand('t');
    typeCharacterCommand('a');
    typeCharacterCommand('t');
    typeCharacterCommand('i');
    typeCharacterCommand('o');
    typeCharacterCommand('n');
    typeCharacterCommand('l');
    eventSender.leapForward(1000);
    typeCharacterCommand(' ');
    typeCharacterCommand('\n');
    typeCharacterCommand('t');
    typeCharacterCommand('h');
    typeCharacterCommand('e');
    typeCharacterCommand(' ');
    typeCharacterCommand('n');
    typeCharacterCommand('o');
    typeCharacterCommand('t');
    typeCharacterCommand('a');
    typeCharacterCommand('t');
    typeCharacterCommand('i');
    typeCharacterCommand('o');
    typeCharacterCommand('n');
    typeCharacterCommand('l');
    typeCharacterCommand(',');
}

</script>

<title>Autocorrection Simple Test</title>
</head>
<body>
<div>You should see two phrases 'the notational'. In the second phrase, the word 'notational' has blue underline.</div>
<p style="color:green">
    This test does not run interactively.
    It uses the event sender to do mouse clicks.
    To run it manually, after loading the page, type whitespace to accept the correction. Now the word 'notationl' should be replaced by 'notational' with blue underline.
</p>
<p  style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'notational' as the correct spelling of 'notationl' several times, the spell checker will not provide 'notational' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.</p>
<div contenteditable id="root" class="editing">
<span id="test"></span>
</div>


<script>
runEditingTest();
</script>

</body>
</html>
