| <script src="../../resources/js-test-pre.js"></script> |
| <input type="text" maxlength="3" value="abc"> |
| description('This test attempts to insert a character in the middle of a text field with maxlength.'); |
| var input = document.querySelector('input'); |
| input.selectionStart = 1; |
| shouldBeEqualToString('input.value', 'abc'); |
| shouldBeEqualToString('input.getAttribute("maxlength")', '3'); |
| input.oninput = function () { |
| shouldBeEqualToString('input.value', 'abc'); |
| eventSender.keyDown('1'); |
| debug('To test manually, type in "1" into the text field. It should fail.'); |
| var successfullyParsed = true; |
| <script src="../../resources/js-test-post.js"></script> |