blob: 8ecda1198359c50daa132f3c971ad5324c1f997a [file] [log] [blame]
<!DOCTYPE html>
<html>
<script>
function runTest() {
if (window.testRunner)
testRunner.dumpAsText();
const input = document.createElement('input');
document.body.appendChild(input);
const inputwithautofocus = document.createElement('input');
inputwithautofocus.setAttribute('autofocus', '');
inputwithautofocus.addEventListener('focus', () => {
input.type = 'submit';
});
document.body.appendChild(inputwithautofocus);
input.setSelectionRange(0, 0);
getSelection().containsNode(document.body);
}
</script>
<body onload=runTest()>
<p>This test passes if there is no crash </p>
</body>
</html>