blob: 8d193045bd2ec05b25f01e77c1e323b07f33ed75 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>This tests that the Strong Password AutoFill button renders in an auto-filled input. It can only be tested in the test tool.</p>
<div id="container">
<input type="text" value="A quick brown fox jumped over the lazy dog.">
<input type="password" value="A quick brown fox jumped over the lazy dog.">
<input type="password" value="A quick brown fox jumped over the lazy dog." style="width:300px">
<input type="password" value="A quick brown fox jumped over the lazy dog." style="width:20px">
<input type="password" value="A quick brown fox jumped over the lazy dog." style="height:100px">
<input type="password" value="A quick brown fox jumped over the lazy dog." style="width:20px; height:100px">
</div>
<script>
if (window.internals) {
var inputs = document.querySelectorAll("input");
for (var i = 0; i < inputs.length; ++i) {
window.internals.setAutofilled(inputs[i], true);
window.internals.setShowAutoFillButton(inputs[i], "StrongPassword");
}
var dynamicInput = document.createElement("input");
window.internals.setAutofilled(dynamicInput, true);
window.internals.setShowAutoFillButton(dynamicInput, "StrongPassword");
document.querySelector("#container").appendChild(dynamicInput);
}
</script>
</body>
</html>