summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-ax.html
blob: dd13df7de7131bbcc0da5dbc6b5d71894fdcc0e1 (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="week" id="week1" value="2000-W13">

<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 week1 = document.getElementById('week1');
openPicker(week1, test1);

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

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