blob: bcd4d58115629183e99821476b6eaca54a0166e2 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<meta charset="UTF-8">
</head>
<body id="body">
<div id="container">
<input id="pw1" type="password" value="password">
<input id="pw2" type="password" value="strong password">
<input id="pw3" type="password" value="strong confirmation password">
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests the strong password fields on iOS");
var pw1 = document.getElementById("pw1");
var pw2 = document.getElementById("pw2");
var pw3 = document.getElementById("pw3");
if (window.internals) {
window.internals.setAutofilled(pw2, true);
window.internals.setShowAutoFillButton(pw2, "StrongConfirmationPassword");
window.internals.setAutofilled(pw3, true);
window.internals.setShowAutoFillButton(pw3, "StrongPassword");
}
if (window.accessibilityController) {
var axPw1 = accessibilityController.accessibleElementById("pw1");
var axPw2 = accessibilityController.accessibleElementById("pw2");
var axPw3 = accessibilityController.accessibleElementById("pw3");
shouldBeFalse("axPw1.boolAttributeValue('AXIsStrongPasswordField')");
shouldBeTrue("axPw2.boolAttributeValue('AXIsStrongPasswordField')");
shouldBeTrue("axPw3.boolAttributeValue('AXIsStrongPasswordField')");
shouldBe("axPw1.stringValue", "'AXValue: ••••••••'");
shouldBe("axPw2.stringValue", "'AXValue: strong password'");
shouldBe("axPw3.stringValue", "'AXValue: strong confirmation password'");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>