| Index: LayoutTests/editing/deleting/delete-inline-br.html
|
| diff --git a/LayoutTests/editing/deleting/delete-inline-br.html b/LayoutTests/editing/deleting/delete-inline-br.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3475ef8b36e8698b7869a1e5850b2a46a626edde
|
| --- /dev/null
|
| +++ b/LayoutTests/editing/deleting/delete-inline-br.html
|
| @@ -0,0 +1,36 @@
|
| +<div id="container">
|
| +<p id="description"></p>
|
| +<ol>
|
| +<li>Place the caret at the start of the second line</li>
|
| +<li>Hit Baskspace or Delete to a back-delete</li>
|
| +<li>The two lines should then be merged and the caret should get placed after the text control.</li>
|
| +</ol>
|
| +<div contenteditable="true">
|
| +<span id="sample">text1<input type="text"/><br>text2</span>
|
| +</div>
|
| +</div>
|
| +<div id="console"></div>
|
| +<script src="../../fast/js/resources/js-test-pre.js"></script>
|
| +<script>
|
| +description('Testcase for verifying that the <br> does not get deleted when inlined after some non-textual content.');
|
| +function $(id) { return document.getElementById(id); }
|
| +
|
| +function absoluteCaretBounds(node) {
|
| + return window.internals ? internals.absoluteCaretBounds(node) : '';
|
| +}
|
| +
|
| +var selection = window.getSelection();
|
| +selection.collapse(('sample'), 2);
|
| +var expectedCaretRect = absoluteCaretBounds(document);
|
| +
|
| +selection.collapse(('sample'), 3);
|
| +document.execCommand("Delete");
|
| +var caretRect = absoluteCaretBounds(document);
|
| +
|
| +shouldBe("caretRect.left", "expectedCaretRect.left");
|
| +shouldBe("caretRect.top", "expectedCaretRect.top");
|
| +
|
| +if (window.testRunner)
|
| + $('container').outerHTML = '';
|
| +</script>
|
| +<script src="../../fast/js/resources/js-test-pre.js"></script>
|
|
|