Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / inserting / 5607069-3.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/dump-as-markup.js"></script>
5 <div id="div" contenteditable="true"><form style="border: 1px solid blue;"><input type="text">xx<input type="text"></form></div>
6 <script>
7 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.");
8 div = document.getElementById("div");
9 form = div.childNodes[0];
10 text = form.childNodes[1];
11 window.getSelection().collapse(text, 1);
12 document.execCommand("InsertParagraph");
13 Markup.dump(div);
14 </script>
15 </body>
16 </html>