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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Text/normalize-crash-in-spell-checker.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 <div id="sample" contenteditable="true"></div> 2 <div id="sample" contenteditable="true"></div>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 6
7 function $(id) { return document.getElementById(id); } 7 function $(id) { return document.getElementById(id); }
8 8
9 if (window.internals) { 9 if (window.internals) {
10 internals.settings.setUnifiedTextCheckerEnabled(true);
11 internals.setContinuousSpellCheckingEnabled(true); 10 internals.setContinuousSpellCheckingEnabled(true);
12 } 11 }
13 12
14 var text1 = document.createTextNode('abc'); 13 var text1 = document.createTextNode('abc');
15 var text2 = document.createTextNode(' defg'); 14 var text2 = document.createTextNode(' defg');
16 var sample = $('sample'); 15 var sample = $('sample');
17 sample.appendChild(text1); 16 sample.appendChild(text1);
18 sample.appendChild(text2); 17 sample.appendChild(text2);
19 var selection = window.getSelection(); 18 var selection = window.getSelection();
20 selection.collapse(sample, 0); 19 selection.collapse(sample, 0);
21 selection.extend(sample, 2); 20 selection.extend(sample, 2);
22 sample.normalize(); 21 sample.normalize();
23 22
24 if (window.testRunner) 23 if (window.testRunner)
25 document.body.textContent = 'PASS; NOT CRASHED'; 24 document.body.textContent = 'PASS; NOT CRASHED';
26 </script> 25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698