<!DOCTYPE html>
<html>
<body>
<script src="../../resources/dump-as-markup.js"></script>
<div id="div" contenteditable="true"><form style="border: 1px solid blue;"><input type="text">xx<input type="text"></form></div>
<script>
Markup.description("This tests for a bug in InsertParagraph where it would split and clone a <form> element in the same way it would a <p> or a <div>. There should be exactly one form element and one br element between two input elements.");
div = document.getElementById("div");
form = div.childNodes[0];
text = form.childNodes[1];
window.getSelection().setPosition(text, 1);
document.execCommand("InsertParagraph");
Markup.dump(div);
</script>
</body>
</html>
