Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / prevent-block-nesting-01.html
1 <script src="../../resources/dump-as-markup.js"></script>
2 <style>
3 div {
4     border: 1px solid red;
5     margin: 2px;
6 }
7 </style>
8 <p id="description">The code in paste that prevents block nesting had a bug where the order of pasted paragraphs could be reversed.</p>
9 <div id="test" contenteditable="true"><br></div>
10
11 <script>
12 if (window.testRunner)
13     testRunner.dumpEditingCallbacks();
14
15 var s = window.getSelection();
16 var e = document.getElementById("test");
17
18 s.collapse(e, 0);
19 document.execCommand("InsertHTML", false, "There should be an empty line between these two paragraphs.<span><div><br></div></span><div>This paragraph and the empty line should have be in their own divs with a red border.</div>");
20
21 Markup.description(document.getElementById('description').textContent);
22 Markup.dump(e);
23
24 </script>