summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/deleting/delete-before-block-image-2.html
blob: 4f4a68270951b3ad7c28cb9a1de8afed5a1dad3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<head>
<script>
function runTest() {
    if (window.testRunner)
        window.testRunner.dumpAsText();
    img = document.getElementById("img");
    s = window.getSelection();
    s.collapse(img, 0);
    document.execCommand("Delete");
    if (window.testRunner)
        document.body.innerText = document.getElementById("div").innerHTML + "\n\nSelection: [" + s.anchorNode + ", " + s.anchorOffset + "]";
}
</script>    
</head>
<body onLoad="runTest();">
<div>This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=25439">https://bugs.webkit.org/show_bug.cgi?id=25439</a>.</div>
<div>This tests placing the caret just before a block image and pressing delete. The image should move up one line.</div>
<div id="div" contentEditable="true"><br><img id="img" style="display:block;" src="../resources/abe.png"></div>
</body>