upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / editing / execCommand / 5210032.html
1 <p>This tests for a bug where content before a list made into a list item would be placed at the end of the list instead of the beginning. The list items below should contain "One", "Two" and "Three", in that order.</p>
2 <div id="div" contenteditable="true"><div>One</div><ul><li>Two</li><li>Three</li></ul></div>
3 <p id="console"></p>
4
5 <script>
6
7 if (window.layoutTestController)
8     layoutTestController.dumpAsText();
9
10 function log(message) {
11     var console = document.getElementById("console");
12     var text = document.createTextNode(message);
13     console.appendChild(text);
14 }
15
16 var div = document.getElementById("div");
17 var selection = window.getSelection();
18 div.focus();
19 selection.setPosition(div, 0);
20 document.execCommand("InsertUnorderedList");
21
22 log(div.innerHTML);
23
24 </script>