chromium/third_party/blink/web_tests/editing/inserting/replace_text_with_br.html

<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
    '<div contenteditable>^foo bar|</div>',
    'insertLineBreak',
    '<div contenteditable><br>|<br></div>'),
    'replace text with BR');

test(() => assert_selection(
    '<div contenteditable>^foo    <i>  bar|</i></div>',
    'insertLineBreak',
    '<div contenteditable><br>|<br></div>'),
    'replace text and I with BR');
</script>