blob: d3afb1685e5ba4545b927c20889b5502ff9ba909 [file] [log] [blame]
<head>
<script>
// CAUTION: There must be no newline at the end of this test file.
// An additional text node after the body would prevent the crash.
function test()
{
if (window.testRunner)
testRunner.dumpAsText();
document.getSelection().selectAllChildren(document.body);
document.getSelection().collapseToEnd();
document.execCommand("Delete");
var result;
if (document.body.innerText === "Test for deletion that involves paragraph merging at the very end of a document.\n\nTEST HAS NOT RUN YET\n\nThe test puts the cursor below this paragraph and performs a delete.")
result = "PASS: Backspace deleted a newline and did not cause a crash.";
else
result = "FAIL: The document's innerText is incorrect.";
document.getElementById("result").innerHTML = result;
}
</script>
</head>
<body contenteditable onload="test()">
<p>Test for deletion that involves paragraph merging at the very end of a document.</p>
<p id="result">TEST HAS NOT RUN YET</p>
<pre>The test puts the cursor below this paragraph and performs a delete.</pre><br></body>