Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<html>
<head>
<title>nsIAccessible actions testing for inputs</title>
<link rel="stylesheet" type="text/css"
<script type="application/javascript"
src="../common.js"></script>
<script type="application/javascript"
src="../role.js"></script>
<script type="application/javascript"
src="../states.js"></script>
<script type="application/javascript"
src="../promisified-events.js"></script>
<script type="application/javascript"
src="../actions.js"></script>
<script type="application/javascript">
/* global testAction */
async function doTest() {
document.getElementById("checkbox_mixed").indeterminate = true;
await testAction({ id: "button", actionName: "press", events: CLICK_EVENTS });
await testAction({ id: "input_button", actionName: "press", events: CLICK_EVENTS });
await testAction({ id: "checkbox_unchecked", actionName: "check", events: CLICK_EVENTS });
await testAction({ id: "checkbox_checked", actionName: "uncheck", events: CLICK_EVENTS });
await testAction({ id: "checkbox_mixed", actionName: "cycle", events: CLICK_EVENTS });
await testAction({ id: "radio", actionName: "select", events: CLICK_EVENTS });
await testAction({ id: "textarea", actionName: "activate", events: FOCUS_EVENT });
await testAction({ id: "textinput", actionName: "activate", events: FOCUS_EVENT });
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank" rel="opener"
title="nsIAccessible actions testing">
Mozilla Bug 477975
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<button id="button">Button</button>
<input id="input_button" type="button" value="normal">
<input id="checkbox_unchecked" type="checkbox">Checkbox</input>
<input id="checkbox_checked" type="checkbox" checked="true">Checkbox</input>
<input id="checkbox_mixed" type="checkbox">Checkbox</input>
<fieldset>
<input id="radio" type="radio">Radio</input>
</fieldset>
<textarea id="textarea" placeholder="What's happening?"></textarea>
<input id="textinput" type="text">
</body>
</html>