summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/execCommand/4641880-2.html
blob: a43ca7f1e5e35a97ce1cba938edbc22a6aa57d3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<p>This tests Indent on a selection that ends at the start of a paragraph.  Since we don't paint the gap before the paragraph for most selections like this, we don't perform Indent on the paragraph that the selection ends in.</p>
<div id="div" contenteditable="true">
This paragraph should be indented.<br>
This paragraph should not be indented.</br>
</div>

<script>
if (window.testRunner)
    window.testRunner.dumpEditingCallbacks();
    
var div = document.getElementById("div");
var sel = window.getSelection();
sel.collapse(div, 0);
sel.modify("extend", "forward", "line");
document.execCommand("Indent");
</script>