blob: 506a59a71a078214bade39334cc602b6aa96d393 [file]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../fast/js/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="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>