<html>
<head>
<style>
.editing {
border: 2px solid red;
padding: 12px;
font-size: 24px;
}
</style>
<script src=../../../../LayoutTests/editing/editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
function editingTest() {
textarea = document.getElementById('test');
textarea.focus();
document.execCommand("InsertText", false, "this brougt");
typeCharacterCommand(' ');
document.execCommand("Delete");
document.execCommand("Delete");
typeCharacterCommand(' ');
// Now the word "brough" should carry misspelling marker.
document.execCommand("Delete");
}
</script>
<title>Removing misspelling marker after appending letter test.</title>
</head>
<body>
<div>The test verified that misspelling marker is removed after appending new letter to misspelled word. You should see the phrase "this brought" without red underline.</div>
<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'brought' as the correct spelling of 'brougth' several times, the spell checker will not provide 'notational' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.</p>
<textarea id="test" cols="80" rows="10"></textarea>
</div>
<script>
runEditingTest();
</script>
</body>
</html>