blob: a44a8a801836a11e5a4e88288050b70eb2cbeaa4 [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 and paste "hello world" below. WebKit should not nest b, i, u, and font.</p>
<div id="test" contenteditable><b><i><u><font color="red">hello world</font></u></i></b></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
Markup.description(document.getElementById('description').textContent);
document.getElementById('test').focus();
Markup.dump('test', 'Before copy-paste');
document.execCommand('SelectAll', false, null);
document.execCommand('Copy', false, null);
document.execCommand('Paste', false, null);
Markup.dump('test', 'After copy-paste');
</script>
</body>
</html>