Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: LayoutTests/accessibility/input-type-password-selection.html

Issue 1009543009: Re-land: Return the accessible selection bounds in password fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/accessibility/input-type-password-selection-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/accessibility/input-type-password-selection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698