blob: d8279c4a819e866a14cf53e71d623de20300cc5d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<input type=password>
<input type=text>
<script>
description("Verify that basic focusing/unfocusing updates secure input state.");
var passwordInput = document.getElementsByTagName("input")[0];
var textInput = document.getElementsByTagName("input")[1];
debug("Initial state, no selection:");
shouldBe("testRunner.secureEventInputIsEnabled", "false");
debug("\nA password input is focused:");
passwordInput.focus();
shouldBe("testRunner.secureEventInputIsEnabled", "true");
debug("\nA regular text input is focused:");
textInput.focus();
shouldBe("testRunner.secureEventInputIsEnabled", "false");
debug("\nA password input is focused again:");
passwordInput.focus();
shouldBe("testRunner.secureEventInputIsEnabled", "true");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>