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

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

Issue 23311004: inline <br> does not get deleted when following some non-textual content (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch with changed layout testcase Created 7 years, 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 div { border: 1px solid black; }
6 </style>
7 <script src="../../fast/js/resources/js-test-pre.js"></script>
8 <script>
9 function runTest() {
10 description('Testcase for verifying that the &lt;br&gt; does not get deleted when inlined after some non-textual content.\nTo manually verify this issue, pl ace the caret at the start of the second line and then do a back-delete (backspa ce). The two lines should then be merged and the caret should get placed after t he text control.');
11
12 if (window.internals) {
13 var selection = window.getSelection();
14 var testElement = document.getElementById('test');
15
16 selection.collapse(testElement, 2);
17 expectedCaretRect = internals.absoluteCaretBounds(document);
18
19 selection.collapse(testElement, 3);
20 document.execCommand("Delete");
21 caretRect = internals.absoluteCaretBounds(document);
22
23 shouldBe("caretRect.left", "expectedCaretRect.left");
24 shouldBe("caretRect.top", "expectedCaretRect.top");
25
26 testElement.style.display = 'none';
27 }
28 }
29 </script>
30 <body onLoad="runTest()">
31 <div contenteditable="true">
32 <span id="test">text1<input type="text"/><br>text2</span>
33 </div>
34 <div id="description"></div>
35 <div id="console"></div>
36 </body>
37 </html>
OLDNEW
« no previous file with comments | « LayoutTests/editing/deleting/delete-br-001-expected.txt ('k') | LayoutTests/editing/deleting/delete-inline-br-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698