OLD | NEW |
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.setSpellCheckingEnabled(true); | 17 internals.setSpellCheckingEnabled(true); |
| 18 if (window.testRunner) |
| 19 testRunner.setMockSpellCheckerEnabled(true); |
18 | 20 |
19 async_test(function(t) | 21 async_test(function(t) |
20 { | 22 { |
21 document.getElementById('editable').focus(); | 23 document.getElementById('editable').focus(); |
22 document.execCommand('InsertText', false, 'Foo baz chello there.'); | 24 document.execCommand('InsertText', false, 'Foo baz chello there.'); |
23 assert_equals(document.getElementById('editable').childNodes.length, 1); | 25 assert_equals(document.getElementById('editable').childNodes.length, 1); |
24 | 26 |
25 step_timeout(function() | 27 step_timeout(function() |
26 { | 28 { |
27 var axEditable = accessibilityController.accessibleElementById('edit
able'); | 29 var axEditable = accessibilityController.accessibleElementById('edit
able'); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 103 |
102 assert_equals(axStaticText.misspellingsCount, 1); | 104 assert_equals(axStaticText.misspellingsCount, 1); |
103 assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditab
le'); | 105 assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditab
le'); |
104 | 106 |
105 document.getElementById('textarea').style.display = "none";; | 107 document.getElementById('textarea').style.display = "none";; |
106 t.done(); | 108 t.done(); |
107 }, 50); | 109 }, 50); |
108 }, 300); | 110 }, 300); |
109 }, 'Misspellings should be reported in textareas.'); | 111 }, 'Misspellings should be reported in textareas.'); |
110 </script> | 112 </script> |
OLD | NEW |