blob: 254f03ad22b13e7884455624966879583e06b83a [file] [log] [blame]
<!DOCTYPE html>
<html>
<body style="background-color: #fee; font-family: 'courier new', monospace; font-size: 13px; word-wrap: break-word;" contenteditable>
<p id="description">This test ensures WebKit does not skip paragraphs when determining the insertion position for paste.<br>
You should see "hello world&lt;caret&gt; WebKit" below.</p>
<div id="test" contenteditable>
<font class="Apple-style-span" face="'courier new', monospace"><div style="font-family: arial;">
<span class="Apple-style-span" style="font-family: 'courier new', monospace;">hello</span></div>
<div style="font-family: arial; "><span class="Apple-style-span" style="font-family: 'courier new', monospace;">&nbsp;WebKit</span></div></font>
</div>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description(document.getElementById('description').textContent);
moveSelectionForwardByLineBoundaryCommand();
Markup.dump('test', 'Initial markup');
insertHTMLCommand('<span class="Apple-style-span" style="background-color: #fee;">&nbsp;world</span>');
Markup.dump('test', 'After inserting " world"');
for (var i = 0; i < 5; i++) // Make sure we're at the very end.
moveSelectionForwardByLineCommand();
moveSelectionBackwardByLineBoundaryCommand();
deleteCommand();
Markup.dump('test', 'After deleting line break before " WebKit"');
</script>
</body>
</html>