3 <body onpaste="finish()">
4 <p>This tests copying an element with a background color specified in a style rule that conflicts with the background color of a wrapping style.
5 The pasted text should have lightgreen background color.</p>
7 .add { background-color: lightgreen; }
9 <div style="background-color: red;">
10 <div id="target" class='add'>
13 <div>some other text</div>
17 <div id="destination" contenteditable></div>
22 document.body.removeChild(document.querySelector('style'));
23 document.body.removeChild(target.parentNode);
26 document.body.focus();
27 var target = document.getElementById('target');
28 getSelection().collapse(target, 0);
29 getSelection().modify('move', 'forward', 'line');
30 getSelection().modify('move', 'backward', 'lineboundary');
31 getSelection().modify('extend', 'backward', 'line');
33 if (window.testRunner) {
34 document.execCommand('Copy', false, null);
35 document.getElementById('destination').focus();
36 document.execCommand('Paste', false, null);