3 <script src="../fast/js/resources/js-test-pre.js"></script>
7 testRunner.waitUntilDone();
9 description("This tests that checking of an aria checkbox sends a notification.");
10 window.root = accessibilityController.rootElement;
11 window.body = root.childAtIndex(0);
13 var accessibleCheckbox = body.childAtIndex(0);
14 var notificationCount = 0;
16 function listener(notification) {
17 if (notification == "CheckedStateChanged")
20 document.getElementById("console").innerText += "Got notification: " + notification + "\n";
22 if (notificationCount == 2) {
23 accessibleCheckbox.removeNotificationListener(listener);
24 if (window.testRunner)
25 testRunner.notifyDone();
28 accessibleCheckbox.addNotificationListener(listener);
30 // Check the checkbox.
31 document.getElementById('checkbox1').setAttribute('aria-checked', 'true');
32 document.getElementById('checkbox1').setAttribute('aria-checked', 'false');
38 <div id="checkbox1" tabindex=0 role="checkbox" aria-checked="false">Test Checkbox</div>
40 <p id="description"></p>
41 <div id="console"></div>
45 <script src="../fast/js/resources/js-test-post.js"></script>