<html> | |
<title>This tests the selecting a long continuation content won't result in crash.</title> | |
<body>Pass in no crash</body> | |
<script> | |
if (window.testRunner) | |
testRunner.dumpAsText(); | |
let spanContainer = document.createElement("span"); | |
document.body.appendChild(spanContainer); | |
for (let i = 0; i < 1000; ++i) { | |
spanContainer.appendChild(document.createTextNode("x")); | |
spanContainer.appendChild(document.createElement("div")); | |
} | |
let range = new Range(); | |
range.setStartBefore(spanContainer); | |
range.setEndAfter(spanContainer); | |
const selection = window.getSelection(); | |
selection.addRange(range); | |
</script> | |
</html> |