blob: 169cf0de87d3c2e68c5c3c95cc1fb4583e0c692b [file] [log] [blame]
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => {
if (!window.testRunner) {
assert_unreached('This test should be run with testRunner.');
return;
}
assert_selection(
[
'<div contenteditable>',
'<div>',
'^foo',
'<div style="color: rgb(255, 0, 0);">',
'<div>bar|</div>',
'</div>',
'</div>',
].join(''),
selection => {
selection.document.execCommand('copy');
selection.document.execCommand('paste');
},
[
'<div contenteditable>',
'foo',
'<div style="color: rgb(255, 0, 0);">',
'bar|',
'</div>',
'</div>',
].join(''));
}, 'paste should not create empty style or font tags');
</script>