blob: 7833f4a8d055e9f0e85028287a6580e838908f25 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p id="description">This tests copying and pasting text does not result in nested style elements such as b, em, and font.
To manually test, copy "hello world" below and paste it in the box below. WebKit should not nest b, i, u, and font.</p>
<div id="source" contenteditable><i>hello</i></div>
<div id="destination" style="border: solid 1px block;" contenteditable><font size=5><u><br></u></font></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
Markup.description(document.getElementById('description').textContent);
Markup.dump('source', 'Before copy');
document.getElementById('source').focus();
document.execCommand('SelectAll', false, null);
document.execCommand('Copy', false, null);
document.getElementById('destination').focus();
document.execCommand('Paste', false, null);
Markup.dump('destination', 'After paste');
</script>
</body>
</html>