summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/calendar-picker/month-picker-ax.html
blob: 1b6449297154854b08a56ec02975b77f7f3b5c8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test.js"></script>
<script src="../../forms/resources/picker-common.js"></script>
<script src="resources/calendar-picker-common.js"></script>
<p id="description"></p>
<div id="console"></div>
<input type="month" id="month1" value="2000-01">

<script>
description('Tests if typing an arrow key dispatches |Focus| and |ActiveDescendantChanged| a11y events.');

window.accessibilityController.setNotificationListener(function(axnode, type) {
    if (type == 'Focus') {
        // Remove ',' to reduce platform differences.
        debug('Focused: ' + escapeHTML(accessibilityController.focusedElement.name.replace(/,/g, '')));
    } else if (type == 'ActiveDescendantChanged') {
        testPassed('Received ActiveDescendantChanged');
        if (++activeDescendantCounter == 2)
            finishJSTest();
    }
});
var activeDescendantCounter = 0;
var month1 = document.getElementById('month1');
openPicker(month1, test1);

function test1() {
    eventSender.keyDown('rightArrow');
}

</script>
</body>
</html>