<!DOCTYPE html>
<html>
<body>
<p>This tests a bug when copying HTML markup inside <pre> tags. When pasted, this content would appear as the rendered form of that markup.
You should see markup in the editable region below. See <rdar://5027857>.</p>
<div><pre id="pre" contenteditable="true"><input type='button'>foo<br>bar<b>baz</b></pre></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
var pre = document.getElementById("pre");
pre.focus();
document.execCommand("SelectAll");
document.execCommand("Cut");
document.execCommand("Paste");
Markup.description(document.getElementsByTagName('p')[0].textContent);
Markup.dump(pre.parentNode);
</script>
</body>
</html>