Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: LayoutTests/editing/deleting/delete-inline-br.html

Issue 18799004: Don't insert redundant BR for merging (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-09-05T16:10:37 Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <div id="container">
2 <p id="description"></p>
3 <ol>
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 th e text control.</li>
7 </ol>
8 <div contenteditable="true">
9 <span id="sample">text1<input type="text"/><br>text2</span>
10 </div>
11 </div>
12 <div id="console"></div>
13 <script src="../../fast/js/resources/js-test-pre.js"></script>
14 <script>
15 description('Testcase for verifying that the &lt;br&gt; does not get deleted whe n inlined after some non-textual content.');
16 function $(id) { return document.getElementById(id); }
17
18 function absoluteCaretBounds(node) {
19 return window.internals ? internals.absoluteCaretBounds(node) : '';
20 }
21
22 var selection = window.getSelection();
23 selection.collapse(('sample'), 2);
24 var expectedCaretRect = absoluteCaretBounds(document);
25
26 selection.collapse(('sample'), 3);
27 document.execCommand("Delete");
28 var caretRect = absoluteCaretBounds(document);
29
30 shouldBe("caretRect.left", "expectedCaretRect.left");
31 shouldBe("caretRect.top", "expectedCaretRect.top");
32
33 if (window.testRunner)
34 $('container').outerHTML = '';
35 </script>
36 <script src="../../fast/js/resources/js-test-pre.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698