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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-mixed-editable-long-text-crash.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 <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 test(function() { 15 test(function() {
16 if (window.internals) { 16 if (window.internals) {
17 internals.setContinuousSpellCheckingEnabled(true); 17 internals.setContinuousSpellCheckingEnabled(true);
18 internals.settings.setUnifiedTextCheckerEnabled(true);
19 } 18 }
20 19
21 // Make text for spell checking longer than |kChunkSize|=16*1024 defined in 20 // Make text for spell checking longer than |kChunkSize|=16*1024 defined in
22 // SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar() 21 // SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar()
23 var words = document.getElementById('words'); 22 var words = document.getElementById('words');
24 words.textContent = ' 123'.repeat(1024 * 4); 23 words.textContent = ' 123'.repeat(1024 * 4);
25 24
26 // Trigger spell checking 25 // Trigger spell checking
27 window.getSelection().collapse(document.getElementById('sample'), 0); 26 window.getSelection().collapse(document.getElementById('sample'), 0);
28 }); 27 });
29 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698