Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Text / normalize-crash-in-spell-checker.html
blobbb7866c16f0fd8e8354438f308979043dd0cd9b7
1 <!DOCTYPE html>
2 <div id="sample" contenteditable="true"></div>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 function $(id) { return document.getElementById(id); }
9 if (window.internals) {
10 internals.settings.setUnifiedTextCheckerEnabled(true);
11 internals.setContinuousSpellCheckingEnabled(true);
14 var text1 = document.createTextNode('abc');
15 var text2 = document.createTextNode(' defg');
16 var sample = $('sample');
17 sample.appendChild(text1);
18 sample.appendChild(text2);
19 var selection = window.getSelection();
20 selection.collapse(sample, 0);
21 selection.extend(sample, 2);
22 sample.normalize();
24 if (window.testRunner)
25 document.body.textContent = 'PASS; NOT CRASHED';
26 </script>