blob: 61f40e64faa5c310e8d8274ba50f553f4b52a73e [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 ESC Test</title>
</head>
<body>
<div><p>This test verifies that autocorrection is not applied when user dismisses correction panel by pressing
ESC key.</p>
<p>After seeing the correction panel, press ESC key, then press space. You should see the phrase "the collaps"
where "collaps" has red mispell underline. </p>
<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>