4 <p>This test verifies that WebKit does not erroneously clone nodes hierarchy when copying text with background color.
5 "Hello" should be blue and has yellow background but you should not see red border.
</p>
6 <p>To manually this test, copy
"Hello" and paste it on the black box below.
</p>
7 <div style=
"padding: 10px;"><span style=
"color: blue; background-color: yellow; padding: 5px;"><div><span style=
"border: 2px solid red; border-radius: 15px;">
8 <span id=
"source">Hello
</span>
9 </span></div></span></div>
10 <div id=
"destination" style=
"border: solid 1px black; padding: 20px;" contenteditable
></div>
11 <script src=
"../../resources/dump-as-markup.js"></script>
14 if (window
.testRunner
) {
15 window
.getSelection().setBaseAndExtent(document
.getElementById('source'), 0, document
.getElementById('source'), 1);
16 document
.execCommand("Copy");
18 window
.getSelection().collapse(document
.getElementById('destination'), 0);
19 document
.execCommand("Paste");
21 Markup
.description(document
.getElementsByTagName('p')[0].textContent
);
22 Markup
.dump('destination', 'You should not see any borders');