Bug 1772588 [wpt PR 34302] - [wpt] Add test for block-in-inline offsetParent., a...
[gecko.git] / editor / libeditor / tests / test_bug1355792.html
blobc8231ebec4046adbf599a9628d87cdef3d877c2b
1 <!DOCTYPE html>
2 <title>Test for Bug 1355792</title>
3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
4 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
5 <div contenteditable><div><font><table><td>a</table><br><br><table><td>b</table></font></div></div>
6 <script>
7 var font = document.querySelector("font");
8 getSelection().collapse(font, 1);
9 document.execCommand("forwarddelete");
10 is(document.body.firstChild.innerHTML,
11 "<div><font><table><tbody><tr><td>a</td></tr></tbody></table><br>"
12 + "<table><tbody><tr><td>b</td></tr></tbody></table></font></div>",
13 "No creating an extra <br>");
14 is(getSelection().focusNode, font, "Selection node should not change");
15 is(getSelection().focusOffset, 1, "Selection offset should not move");
16 ok(getSelection().isCollapsed, "Selection should be collapsed");
17 </script>