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 <script src="../assert_selection.js"></script> | 4 <script src="../assert_selection.js"></script> |
5 <script src="spellcheck_test.js"></script> | 5 <script src="spellcheck_test.js"></script> |
6 | 6 |
7 <script> | 7 <script> |
8 // This file shows sample usage of spellcheck_test.js | 8 // This file shows sample usage of spellcheck_test.js |
9 | 9 |
10 spellcheck_test( | 10 spellcheck_test( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 const div = document.querySelector('div'); | 56 const div = document.querySelector('div'); |
57 div.setAttribute('spellcheck', 'true'); | 57 div.setAttribute('spellcheck', 'true'); |
58 // Trigger spellchecker by selection change. | 58 // Trigger spellchecker by selection change. |
59 document.getSelection().collapse(div, 0); | 59 document.getSelection().collapse(div, 0); |
60 }, | 60 }, |
61 '<div contenteditable spellcheck="true">#zz#.</div>', | 61 '<div contenteditable spellcheck="true">#zz#.</div>', |
62 'Marker appears after setting spellcheck=true.' | 62 'Marker appears after setting spellcheck=true.' |
63 ) | 63 ) |
64 }); | 64 }); |
65 | 65 |
66 // TODO(xiaochengh): Design interface to verify cold mode checking results. | 66 spellcheck_test( |
| 67 '<div contenteditable>zz</div>', |
| 68 '', |
| 69 '<div contenteditable>#zz#</div>', |
| 70 { |
| 71 title: 'Text without focus is checked by cold mode checker', |
| 72 needsFullCheck: true |
| 73 }); |
67 </script> | 74 </script> |
OLD | NEW |