1 <div id=
"description1">This tests to see if BackColor can be performed on a caret selection. The text typed afterword should have the new background color.
</div>
2 <div id=
"edit1" contentEditable=
"true"></div>
4 <div id=
"description2">This tests to see if ForeColor can be performed in a plaintext-only region. The text typed afterword should not have the requested color.
</div>
5 <div id=
"edit2" contentEditable=
"plaintext-only"></div>
9 window
.testRunner
.dumpAsText();
11 edit1
= document
.getElementById("edit1");
13 document
.execCommand("BackColor", false, "#00F");
14 document
.execCommand("InsertText", false, "Blue");
16 edit2
= document
.getElementById("edit2");
18 document
.execCommand("ForeColor", false, "#00F");
19 document
.execCommand("InsertText", false, "Black");
21 if (window
.testRunner
)
22 document
.body
.innerText
= document
.getElementById("description1").innerText
+ "\n" + edit1
.innerHTML
+ "\n\n" +
23 document
.getElementById("description2").innerText
+ "\n" + edit2
.innerHTML
;