3 <title>Editing Test: extend selection and bold
</title>
6 <p>This tests bolding the first
21 letters in the following sentence. Every character (including spaces) before
"jumps" must be bolded.
7 <div contenteditable
id=
"root" class=
"editing">
8 <span id=
"test">"The quick brown fox jumps over the lazy dog" uses every
9 letter in the english language.
16 if (window
.testRunner
)
17 testRunner
.dumpAsText();
19 var e
= document
.getElementById("test");
20 var selection
= window
.getSelection();
21 selection
.collapse(e
, 0);
23 for (i
= 0; i
< 21; i
++) {
24 selection
.modify("extend", "forward", "character");
25 document
.execCommand('bold', false, null);
28 document
.body
.appendChild(document
.createTextNode(document
.getElementById('test').innerHTML
));