Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / spelling / spelling-backward.html
blobf2dc5145e6b87fbf6e6ff725ae00def05a01255a
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test.js"></script>
5 <script src="../../editing/editing.js"></script>
6 <div id="div" contenteditable="true"></div>
7 <script>
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.');
12 jsTestIsAsync = true;
14 if (window.internals) {
15 internals.settings.setUnifiedTextCheckerEnabled(true);
16 internals.settings.setAsynchronousSpellCheckingEnabled(true);
19 var div = document.getElementById("div");
20 div.focus();
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();
30 if (window.internals)
31 shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", finishJSTest);
32 </script>
33 </body>
34 </html>