blob: 20ce41fb246387a7e797048152c3158bb8b9fd87 [file] [log] [blame]
<!DOCTYPE>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description">This makes sure we are able to delete the contents of a password field: deleting a selection and evaluating the field contents.</p>
<div id="console"></div>
<input type="password" id="passwordField">
<script>
if (!window.testRunner || !window.internals)
testFailed('This test requires access to window.internals');
var textField;
var desiredString = "hello";
function runTest(element) {
textField = element;
textField.value = "helllo";
textField.focus();
shouldBe("passwordField.value='helllo'; passwordField.setSelectionRange(3, 4); testRunner.execCommand('Delete', false, null); passwordField.value", "'hello'");
textField.parentNode.removeChild(textField);
}
runTest(document.getElementById('passwordField'));
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>