3 <script src=
"../resources/js-test.js"></script>
6 window
.jsTestIsAsync
= true;
8 description("This tests that checking of an aria checkbox sends a notification.");
10 var accessibleCheckbox
= accessibilityController
.accessibleElementById("checkbox1");
11 var notificationCount
= 0;
13 function listener(notification
) {
14 if (notification
== "CheckedStateChanged")
17 debug("Got notification: " + notification
);
19 if (notificationCount
== 2) {
20 accessibleCheckbox
.removeNotificationListener(listener
);
24 accessibleCheckbox
.addNotificationListener(listener
);
26 // Check the checkbox.
27 document
.getElementById('checkbox1').setAttribute('aria-checked', 'true');
28 document
.getElementById('checkbox1').setAttribute('aria-checked', 'false');
34 <div id=
"checkbox1" tabindex=
0 role=
"checkbox" aria-checked=
"false">Test Checkbox
</div>
36 <p id=
"description"></p>
37 <div id=
"console"></div>