chromium/third_party/blink/web_tests/editing/deleting/merge-at-end-of-document.html

<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>