blob: 65ef99a68038e93c04659a658b62ce9ba898349a [file] [log] [blame]
<html>
<head>
<style>
.editing {
border: 2px solid red;
padding: 12px;
font-size: 24px;
}
</style>
<script src="../../LayoutTests/editing/editing.js"></script>
<script>
function editingTest() {
typeCharacterCommand('t');
typeCharacterCommand('h');
typeCharacterCommand('e');
typeCharacterCommand(' ');
typeCharacterCommand('c');
typeCharacterCommand('o');
typeCharacterCommand('l');
typeCharacterCommand('l');
typeCharacterCommand('a');
typeCharacterCommand('p');
typeCharacterCommand('s');
}
</script>
<title>Autocorrection Cancellation By Typing Test</title>
</head>
<body>
<div>This test verifies that autocorrection behaves correctly when continuing typing in a word on which autocorrection panel is hown. You should see correction panel showing 'collapse' after 'collaps' is entered. Then type "ing". Phrase 'the collapsing' should be shown without underline.</div>
<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'collapse' as the correct spelling of 'collaps' several times, the spell checker will not provide 'collapse' 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>