blob: 86bca720e987241c3f98dd6891376e6dd2e8d4b5 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../editing/assert_selection.js"></script>
<script>
const kStyle = [
'<style>',
'#before::before {',
' display: inline-block;',
' content: "before";',
'}',
'#start::after {',
' display: inline-block;',
' content: "after";',
'}',
'</style>',
].join('');
selection_test(
// Note: newline characters are significant. When we omit them, the result
// HTML has both #before and #start.
[
kStyle,
'<div contenteditable>\n',
'<span id="before"></span>|',
'<span>text</span>',
'^<span id="start"></span>\n',
'</div>',
].join(''),
'insertLineBreak',
[
kStyle,
'<div contenteditable><br>|<br></div>',
].join(''),
'Replace selection with BR');
</script>