blob: 333618bd8b936fc2128d660e8e20f9aa470bcd12 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/ui-helper.js"></script>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<input type=password>
<script>
jsTestIsAsync = true;
description("Verify that removing a password input from DOM tree disables secure input state.");
var passwordInput = document.getElementsByTagName("input")[0];
debug("A password input is focused:");
passwordInput.focus();
UIHelper.ensurePresentationUpdate().then(() => {
shouldBe("testRunner.secureEventInputIsEnabled", "true");
debug("\nAfter deleting the input:");
document.body.removeChild(passwordInput);
})
.then(() => {
return UIHelper.ensurePresentationUpdate()
})
.then(() => {
shouldBe("testRunner.secureEventInputIsEnabled", "false");
finishJSTest();
})
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>