4 <script src=../../resources/js-test.js
language=
"javascript" type=
"text/javascript"></script>
5 <title>Testing moving cursor to a misspelled word
</title>
8 <div id=
"src" contenteditable=
"true" spellcheck=
"true"></div><br/>
9 <script language=
"javascript">
10 description('Test if Chrome spellchecks a word again when changing a misspelled word.' +
11 'To test manually, type a misspelled word "zz " and type a backspace key twice.' +
12 'This test succeeds when "z" is not marked as misspelled.');
16 var node
= document
.getElementById('src');
18 function insertText(text
) {
19 document
.execCommand("InsertText", false, text
);
21 shouldBeTrue('insertText("z"); insertText("z"); insertText(" "); internals.hasSpellingMarker(document, 0, 2)');
23 debug('Enable asynchronous spellchecking, delete two characters, and insert a space');
24 internals
.settings
.setAsynchronousSpellCheckingEnabled(true);
25 internals
.settings
.setUnifiedTextCheckerEnabled(true);
27 testRunner
.execCommand("DeleteBackward");
28 testRunner
.execCommand("DeleteBackward");
29 document
.execCommand("InsertText", false, ' ');
31 shouldBecomeEqual('internals.hasSpellingMarker(document, 0, 1)', 'false', finishJSTest
);