blob: 5c37b4a8e47e4a4891d25a19ff5bd6d8502347ae [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p id="description">This test copies and pastes content inside pre that is an editing host. WebKit should not clone pre.
To manually test, cut and paste "hello\nworld" WebKit should not nest pre (no red borders).</p>
<style> body > *[contenteditable] {border: solid 2px blue;} pre > pre, div > pre {border: solid 2px red;} </style>
<div contenteditable><pre>hello<br>world</pre></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description(document.getElementById('description').textContent);
var container = document.querySelector('div');
container.focus();
document.execCommand('selectAll', false, null);
Markup.dump(container, 'Before cut paste');
document.execCommand('cut', false, null);
document.execCommand('paste', false, null);
Markup.dump(container, 'After cut paste');
</script>
</body>
</html>