Index: LayoutTests/accessibility/input-type-password-selection.html |
diff --git a/LayoutTests/accessibility/input-type-password-selection.html b/LayoutTests/accessibility/input-type-password-selection.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5c0bba4f0029ba08811f1398ac64842759203d57 |
--- /dev/null |
+++ b/LayoutTests/accessibility/input-type-password-selection.html |
@@ -0,0 +1,31 @@ |
+<!DOCTYPE HTML PUBLIC> |
+<html> |
+<head> |
+<script src="../resources/js-test.js"></script> |
+</head> |
+<body> |
+ |
+<p>This tests that the password fields return their selection.</p> |
+ |
+<input id="password" type="password" value="secret"> |
+ |
+<div id="console"></div> |
+<script> |
+ if (window.testRunner && window.accessibilityController) { |
+ var password = document.getElementById("password"); |
+ var axPassword = accessibilityController.accessibleElementById("password"); |
+ |
+ password.setSelectionRange(0, 0); |
+ shouldBe("axPassword.selectedTextRange", "\"{0, 0}\""); |
+ |
+ password.setSelectionRange(6, 6); |
+ shouldBe("axPassword.selectedTextRange", "\"{6, 0}\""); |
+ |
+ password.setSelectionRange(2, 6); |
+ shouldBe("axPassword.selectedTextRange", "\"{2, 4}\""); |
+ } |
+ |
+</script> |
+ |
+</body> |
+</html> |