Index: third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-two-paragraphs.html |
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-two-paragraphs.html b/third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-two-paragraphs.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..20e8676ad81446d4e17f9bddf627e357544da051 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-two-paragraphs.html |
@@ -0,0 +1,30 @@ |
+<!doctype HTML> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<style> |
+div { |
+ border: 1px solid gray; |
+ padding: 10px; |
+ line-height: 1.44; |
+} |
+</style> |
+<div contenteditable="true" id="editable"> |
+ <p>This is the first paragraph.</p> |
+ <p>This is the second.</p> |
+</div> |
+<script> |
+test(function() { |
+ var editor = document.getElementById('editable'); |
+ var range = document.createRange(); |
+ var selection = window.getSelection(); |
+ range.setStart(editor.childNodes[2], 0); |
+ range.collapse(true); |
+ selection.removeAllRanges(); |
+ selection.addRange(range); |
+ editor.focus(); |
+ document.execCommand('delete', null, false); |
+ |
+ var html_para = document.getElementsByTagName('p')[0].outerHTML; |
+ assert_equals(html_para, '<p>This is the first paragraph.This is the second.</p>'); |
+}, 'merge two paragraphs by backspace'); |
+</script> |