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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/grammar-edit-word.html

Issue 2211813002: Revert removal of grammar checking and marking code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <title>Editing a grammatically-incorrect word</title>
6 </head>
7 <body>
8 <div id="src" contenteditable="true" spellcheck="true"></div><br/>
9 <script language="javascript">
10 description('Test if WebKit removes grammar markers when we edit a grammatically -incorrect word. '
11 + 'To test manually, type a grammatically-incorrect sentence "You has the ri ght." and type '
12 + 'a backspace key to delete the last character of "has". '
13 + 'This test succeeds when "ha" does not have grammar markers.');
14
15 jsTestIsAsync = true;
16
17 if (window.internals)
18 internals.settings.setUnifiedTextCheckerEnabled(true);
19
20 function editAndCheckSentence()
21 {
22 // Delete the end of this sentence until it becomes "You ha".
23 for (var i = 0; i < 12; ++i)
24 testRunner.execCommand("DeleteBackward");
25
26 shouldBecomeEqual('internals.hasGrammarMarker(document, 4, 2)', 'false', fin ishJSTest);
27 }
28
29 var target = document.getElementById('src');
30 target.focus();
31 document.execCommand("InsertText", false, "You has the right.");
32
33 if (window.internals)
34 shouldBecomeEqual('internals.hasGrammarMarker(document, 4, 3)', 'true', edit AndCheckSentence);
35 </script>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698