| 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 <p>Make TextCheckingParagraph.subrange() handles null position returned by | 4 <p>Make TextCheckingParagraph.subrange() handles null position returned by |
| 5 endSentence() in multiple chunks case in | 5 endSentence() in multiple chunks case in |
| 6 SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar() | 6 SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar() |
| 7 </p> | 7 </p> |
| 8 <ul> | 8 <ul> |
| 9 <li id="sample" contenteditable="true">foo <span id="words"></span> | 9 <li id="sample" contenteditable="true">foo <span id="words"></span> |
| 10 <div contenteditable="false" style="-webkit-user-select: none">uneditable</div> | 10 <div contenteditable="false" style="-webkit-user-select: none">uneditable</div> |
| 11 </li> | 11 </li> |
| 12 </ul> | 12 </ul> |
| 13 <div id="log"></div> | 13 <div id="log"></div> |
| 14 <script> | 14 <script> |
| 15 if (window.testRunner) |
| 16 testRunner.setMockSpellCheckerEnabled(true); |
| 17 |
| 15 test(function() { | 18 test(function() { |
| 16 if (window.internals) { | 19 if (window.internals) { |
| 17 internals.setSpellCheckingEnabled(true); | 20 internals.setSpellCheckingEnabled(true); |
| 18 } | 21 } |
| 19 | 22 |
| 20 // Make text for spell checking longer than |kChunkSize|=16*1024 defined in | 23 // Make text for spell checking longer than |kChunkSize|=16*1024 defined in |
| 21 // SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar() | 24 // SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar() |
| 22 var words = document.getElementById('words'); | 25 var words = document.getElementById('words'); |
| 23 words.textContent = ' 123'.repeat(1024 * 4); | 26 words.textContent = ' 123'.repeat(1024 * 4); |
| 24 | 27 |
| 25 // Trigger spell checking | 28 // Trigger spell checking |
| 26 window.getSelection().collapse(document.getElementById('sample'), 0); | 29 window.getSelection().collapse(document.getElementById('sample'), 0); |
| 27 }); | 30 }); |
| 28 </script> | 31 </script> |
| OLD | NEW |