2 <p id=
"description"></p>
4 <li>Place the caret at the start of the second line
</li>
5 <li>Hit Baskspace or Delete to a back-delete
</li>
6 <li>The two lines should then be merged and the caret should get placed after the text control.
</li>
8 <div contenteditable=
"true">
9 <span id=
"sample">text1
<input type=
"text"/><br>text2
</span>
12 <div id=
"console"></div>
13 <script src=
"../../resources/js-test.js"></script>
15 description('Testcase for verifying that the <br> does not get deleted when inlined after some non-textual content.');
16 function $(id
) { return document
.getElementById(id
); }
18 function absoluteCaretBounds(node
) {
19 return window
.internals
? internals
.absoluteCaretBounds(node
) : '';
22 var selection
= window
.getSelection();
23 selection
.collapse($('sample'), 2);
24 var expectedCaretRect
= absoluteCaretBounds(document
);
26 selection
.collapse($('sample'), 3);
27 document
.execCommand('Delete');
28 var caretRect
= absoluteCaretBounds(document
);
30 shouldBe('caretRect.left', 'expectedCaretRect.left');
31 shouldBe('caretRect.top', 'expectedCaretRect.top');
33 if (window
.testRunner
)
34 $('container').outerHTML
= '';
36 <script src=
"../../resources/js-test.js"></script>