blob: c7901f32a3dfdbdbdf3bd3c2a36f2cb7b5acd2c6 [file] [log] [blame]
<html>
<head>
<script>
function test()
{
if (window.layoutTextController)
layoutTestController.dumpAsText();
var edit = document.getElementById("edit");
while (edit.nextSibling)
edit.nextSibling.parentNode.removeChild(edit.nextSibling);
var source = document.getElementById("source");
var selection = getSelection();
selection.setPosition(source.firstChild, 5);
selection.modify("extend", "forward", "word");
document.execCommand("Copy");
edit.focus();
document.execCommand("SelectAll");
document.execCommand("Paste");
}
</script>
</head>
<body onload="test()">
<p>
Test for <i><a href="rdar://problem/6864786">rdar://problem/6864786</a>: REGRESSION: Crash below ApplyStyleCommand::applyInlineStyleToRange when reviewing a patch in Bugzilla</i>.
</p>
<p>
The test passes if it does not crash.
</p>
<div id="source" style="font-size: 36px">Copy the second word in this sentence.</div>
<pre id="edit" style="-webkit-user-modify: read-write-plaintext-only;">Select All here and paste<br></pre>
</body>
</html>