Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
<!doctype html>
<html>
<head>
<title>nsIAccessible value testing for input@type=password element</title>
<link rel="stylesheet" type="text/css"
<script src="../common.js"></script>
<script src="../promisified-events.js"></script>
<script type="application/javascript">
async function doTest() {
const inpNode = getNode("password");
const inp = getAccessible(inpNode);
let editor = SpecialPowers.wrap(inpNode).editor;
let passwordMask = editor.passwordMask;
is(inp.value, "", "a11y value initially empty");
inpNode.value = "passw0rd";
is(inp.value, passwordMask.repeat(8), "a11y value is masked input value");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
<!-- HTML5 input@type=password element -->
<input type="password" id="password">
</body>
</html>