blob: 4f52c9b970ab87dc8e67c9e9e5741df8213a528f [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script src="spellcheck_test.js"></script>
<script>
spellcheck_test(
'<div contenteditable>|</div>',
'insertText This sentence ends with a misspelled word asd.',
'<div contenteditable>This sentence ends with a misspelled word #asd#.</div>',
{
title: 'Mark misspelled word "asd" after typing.',
callback: sample => spellcheck_test(
sample,
() => {
const selection = sample.selection;
selection.modify('move', 'backward', 'character');
selection.modify('move', 'backward', 'character');
selection.modify('move', 'backward', 'character');
selection.modify('move', 'backward', 'character');
selection.modify('move', 'backward', 'character');
},
'<div contenteditable>This sentence ends with a misspelled word #asd#.</div>',
'Misspelled word should still be marked when caret is no longer adjacent with it.')
});
</script>