4 <p id=
"description">This tests copying and pasting text does not result in nested style elements such as b, em, and font.
5 To manually test, copy
"hello world" below and paste it in the box below. WebKit should not nest b, i, u, and font.
</p>
6 <div id=
"source" contenteditable
><i>hello
</i></div>
7 <div id=
"destination" style=
"border: solid 1px block;" contenteditable
><font size=
5><u><br></u></font></div>
8 <script src=
"../../resources/dump-as-markup.js"></script>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 Markup
.description(document
.getElementById('description').textContent
);
15 Markup
.dump('source', 'Before copy');
17 document
.getElementById('source').focus();
18 document
.execCommand('SelectAll', false, null);
19 document
.execCommand('Copy', false, null);
21 document
.getElementById('destination').focus();
22 document
.execCommand('Paste', false, null);
24 Markup
.dump('destination', 'After paste');