blob: 909f54bdfbeab0fd5dc51e5360809d244f795649 [file] [log] [blame]
<!DOCTYPE>
<html>
<body>
<p>This test ensures WebKit allows space be inserted in textarea even when doing so forces the space to wrap to the next line.</p>
<textarea style="font-size: 30px; width: 50px;">ab</textarea>
<script>
var textarea = document.getElementsByTagName('textarea')[0];
textarea.focus();
textarea.selectionStart = textarea.value.length;
textarea.selectionEnd = textarea.value.length;
document.execCommand('InsertText', false, ' ');
var originalLength = textarea.value.length;
document.execCommand('InsertText', false, ' ');
document.writeln(originalLength < textarea.value.length ? 'PASS' : 'FAIL');
if (window.testRunner) {
textarea.parentNode.removeChild(textarea);
testRunner.dumpAsText();
}
</script>
</body>
</html>