Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spelling-backward.html

Issue 2235643002: Code cleanup related to unified text checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableUnifiedTextCheckerByDefault
Patch Set: Rebased on removal of grammar-checking code Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698