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

Unified 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 side-by-side diff with in-line comments
Download patch
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..cca1cc9589e7a295697a995dbd7f8fc8cc61bd41
--- /dev/null
+++ b/LayoutTests/editing/deleting/delete-inline-br.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div { border: 1px solid black; }
+</style>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script>
+function runTest() {
+ 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, place the caret at the start of the second line and then do a back-delete (backspace). The two lines should then be merged and the caret should get placed after the text control.');
+
+ if (window.internals) {
+ var selection = window.getSelection();
+ var testElement = document.getElementById('test');
+
+ selection.collapse(testElement, 2);
+ expectedCaretRect = internals.absoluteCaretBounds(document);
+
+ selection.collapse(testElement, 3);
+ document.execCommand("Delete");
+ caretRect = internals.absoluteCaretBounds(document);
+
+ shouldBe("caretRect.left", "expectedCaretRect.left");
+ shouldBe("caretRect.top", "expectedCaretRect.top");
+
+ testElement.style.display = 'none';
+ }
+}
+</script>
+<body onLoad="runTest()">
+<div contenteditable="true">
+<span id="test">text1<input type="text"/><br>text2</span>
+</div>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
« 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