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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/misspellings.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 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <!-- Layout tests use a mock spell checker with only a few words in its dictiona ry. --> 5 <!-- Layout tests use a mock spell checker with only a few words in its dictiona ry. -->
6 6
7 <div id="editable" contentEditable="true" spellcheck="true"></div> 7 <div id="editable" contentEditable="true" spellcheck="true"></div>
8 8
9 <p id="paragraph" tabIndex="0" spellcheck="true">Hi, how adaasj sdklj?</p> 9 <p id="paragraph" tabIndex="0" spellcheck="true">Hi, how adaasj sdklj?</p>
10 10
11 <input id="input" spellcheck="true"> 11 <input id="input" spellcheck="true">
12 12
13 <textarea id="textarea" spellcheck="true"></textarea> 13 <textarea id="textarea" spellcheck="true"></textarea>
14 14
15 <script> 15 <script>
16 if (window.internals) { 16 if (window.internals)
17 internals.settings.setUnifiedTextCheckerEnabled(true);
18 internals.setContinuousSpellCheckingEnabled(true); 17 internals.setContinuousSpellCheckingEnabled(true);
19 }
20 18
21 async_test(function(t) 19 async_test(function(t)
22 { 20 {
23 document.getElementById('editable').focus(); 21 document.getElementById('editable').focus();
24 document.execCommand('InsertText', false, 'Foo baz chello there.'); 22 document.execCommand('InsertText', false, 'Foo baz chello there.');
25 assert_equals(document.getElementById('editable').childNodes.length, 1); 23 assert_equals(document.getElementById('editable').childNodes.length, 1);
26 24
27 step_timeout(function() 25 step_timeout(function()
28 { 26 {
29 var axEditable = accessibilityController.accessibleElementById('edit able'); 27 var axEditable = accessibilityController.accessibleElementById('edit able');
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 101
104 assert_equals(axStaticText.misspellingsCount, 1); 102 assert_equals(axStaticText.misspellingsCount, 1);
105 assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditab le'); 103 assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditab le');
106 104
107 document.getElementById('textarea').style.display = "none";; 105 document.getElementById('textarea').style.display = "none";;
108 t.done(); 106 t.done();
109 }, 50); 107 }, 50);
110 }, 300); 108 }, 300);
111 }, 'Misspellings should be reported in textareas.'); 109 }, 'Misspellings should be reported in textareas.');
112 </script> 110 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698