1 <div id=
"description1">This tests splitting two paragraphs with InsertParagraph while the typing style is bold. New text entered after the split should be bold.
</div>
2 <div id=
"edit1" contentEditable=
"true">xx
</div>
4 <div id=
"description2">This tests splitting two paragraphs with InsertLineBreak while the typing style is bold. New text entered after the split should be bold. The inserted
<br
> doesn't need to be surrounded by a bold tag here.
</div>
5 <div id=
"edit2" contentEditable=
"true">xx
</div>
9 window
.testRunner
.dumpAsText();
10 edit1
= document
.getElementById("edit1");
12 text
= edit1
.firstChild
;
13 window
.getSelection().collapse(text
, 1);
14 document
.execCommand("Bold");
15 document
.execCommand("InsertParagraph");
16 document
.execCommand("InsertText", false, "Bold");
18 edit2
= document
.getElementById("edit2");
20 text
= edit2
.firstChild
;
21 window
.getSelection().collapse(text
, 1);
22 document
.execCommand("Bold");
23 document
.execCommand("InsertLineBreak");
24 document
.execCommand("InsertText", false, "Bold");
26 if (window
.testRunner
)
27 document
.body
.innerText
= document
.getElementById("description1").innerText
+ "\n" + edit1
.innerHTML
+ "\n\n" +
28 document
.getElementById("description2").innerText
+ "\n" + edit2
.innerHTML
;