chromium/third_party/blink/web_tests/editing/style/highlight-insert-paragraph.html

<html>
<body>
<p>This tests inserting a new paragraph preserves the background color.</p>
<div>
<div id="test" contenteditable="true">
test
</div>
</div>
<div id="console"></div>

<script type="text/javascript">

function pressKey( key ) {
    eventSender.keyDown(key, []);
}

if (window.testRunner)
    testRunner.dumpAsText();

var e = document.getElementById('test');
var s = window.getSelection();

r = document.createRange();
r.setStart(e.firstChild,0);
r.setEnd(e.firstChild,5);
s.removeAllRanges();
s.addRange(r);
document.execCommand("hiliteColor",false,"#99f");

r = document.createRange();
r.setStart(e.firstChild.firstChild,5);
r.setEnd(e.firstChild.firstChild,5);
s.removeAllRanges();
s.addRange(r);
pressKey('Enter');
pressKey('e');

document.getElementById('console').appendChild(document.createTextNode(e.innerHTML));

</script>