Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / merge-at-end-of-document.html
blobd3afb1685e5ba4545b927c20889b5502ff9ba909
1 <head>
2 <script>
4 // CAUTION: There must be no newline at the end of this test file.
5 // An additional text node after the body would prevent the crash.
7 function test()
9 if (window.testRunner)
10 testRunner.dumpAsText();
11 document.getSelection().selectAllChildren(document.body);
12 document.getSelection().collapseToEnd();
13 document.execCommand("Delete");
14 var result;
15 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.")
16 result = "PASS: Backspace deleted a newline and did not cause a crash.";
17 else
18 result = "FAIL: The document's innerText is incorrect.";
19 document.getElementById("result").innerHTML = result;
22 </script>
23 </head>
24 <body contenteditable onload="test()">
25 <p>Test for deletion that involves paragraph merging at the very end of a document.</p>
26 <p id="result">TEST HAS NOT RUN YET</p>
27 <pre>The test puts the cursor below this paragraph and performs a delete.</pre><br></body>