OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <script src="../../editing/editing.js"></script> | 5 <script src="../../editing/editing.js"></script> |
6 <div id="div" contenteditable="true"></div> | 6 <div id="div" contenteditable="true"></div> |
7 <script> | 7 <script> |
8 description('This tests for a bug when moving the caret backward through ' | 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, ' | 9 + 'a misspelled word. Once the caret is no longer adjacent to it, ' |
10 + 'it should be marked as misspelled.'); | 10 + 'it should be marked as misspelled.'); |
11 | 11 |
12 jsTestIsAsync = true; | 12 jsTestIsAsync = true; |
13 | 13 |
14 if (window.internals) | |
15 internals.settings.setUnifiedTextCheckerEnabled(true); | |
16 | |
17 var div = document.getElementById("div"); | 14 var div = document.getElementById("div"); |
18 div.focus(); | 15 div.focus(); |
19 document.execCommand("InsertText", false, "This sentence ends with a misspelled
word asd."); | 16 document.execCommand("InsertText", false, "This sentence ends with a misspelled
word asd."); |
20 | 17 |
21 moveSelectionBackwardByCharacterCommand(); | 18 moveSelectionBackwardByCharacterCommand(); |
22 moveSelectionBackwardByCharacterCommand(); | 19 moveSelectionBackwardByCharacterCommand(); |
23 moveSelectionBackwardByCharacterCommand(); | 20 moveSelectionBackwardByCharacterCommand(); |
24 moveSelectionBackwardByCharacterCommand(); | 21 moveSelectionBackwardByCharacterCommand(); |
25 moveSelectionBackwardByCharacterCommand(); | 22 moveSelectionBackwardByCharacterCommand(); |
26 moveSelectionBackwardByCharacterCommand(); | 23 moveSelectionBackwardByCharacterCommand(); |
27 | 24 |
28 if (window.internals) | 25 if (window.internals) |
29 shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", fi
nishJSTest); | 26 shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", fi
nishJSTest); |
30 </script> | 27 </script> |
31 </body> | 28 </body> |
32 </html> | 29 </html> |
OLD | NEW |