blob: 28ab5cac54578badf140a6cf9d94cef6adbc1740 [file] [log] [blame]
<input type="password" id="passwd">
<script>
// The verifies the reveal button shows the correct glyph in certain scenario.
var passwd = document.getElementById("passwd");
passwd.focus();
eventSender.keyDown('a'); // The reveal button shows
eventSender.keyDown('F8', ['altKey']); // The password is revealed.
passwd.blur(); // passwd hides the reveal-password button AND the password.
passwd.focus();
eventSender.keyDown('Backspace'); // Delete 'a' to make the input empty.
eventSender.keyDown('a'); // The reveal button shows again with correct glyph.
</script>