outdent-inline-list.html 805 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<body contenteditable="true">
<br>
<ol><li id="test1" style="display: inline">one</li><li>two</li><li>three</li></ol>
<ul><li id="test2" style="display: inline">one</li><li>two</li><li>three</li></ul>
<p id="console"></p>
<script>
if (window.layoutTestController)
    layoutTestController.dumpAsText();

function log(message) {
    var console = document.getElementById("console");
    var text = document.createTextNode(message);
    console.appendChild(text);
}

var s = window.getSelection();
var p = document.getElementById("test1");
s.setPosition(p, 0);
document.execCommand("Outdent", false, 0);
log("Test1 passed: no crash ");
var p = document.getElementById("test2");
s.setPosition(p, 0);
document.execCommand("Outdent", false, 0);
log("Test2 passed: no crash");

</script>
</body>
</html>