4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"../../editing/editing.js"></script>
6 <div id=
"div" contenteditable=
"true"></div>
8 description('This tests for a bug when moving the caret backward through '
9 + 'a misspelled word. Once the caret is no longer adjacent to it, '
10 + 'it should be marked as misspelled.');
14 if (window
.internals
) {
15 internals
.settings
.setUnifiedTextCheckerEnabled(true);
16 internals
.settings
.setAsynchronousSpellCheckingEnabled(true);
19 var div
= document
.getElementById("div");
21 document
.execCommand("InsertText", false, "This sentence ends with a misspelled word asd.");
23 moveSelectionBackwardByCharacterCommand();
24 moveSelectionBackwardByCharacterCommand();
25 moveSelectionBackwardByCharacterCommand();
26 moveSelectionBackwardByCharacterCommand();
27 moveSelectionBackwardByCharacterCommand();
28 moveSelectionBackwardByCharacterCommand();
31 shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", finishJSTest
);