Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / menu-list-open.html
blob1424f79150a963449e39ead7d6c82d4d44007dd7
1 <!DOCTYPE HTML>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <select id="menulist">
5 <option id="item0">Alicia</option>
6 <option id="item1">Peter</option>
7 <option id="item2">Kalinda</option>
8 </select>
9 <script>
10 async_test(function(t)
12 var menulist = document.getElementById("menulist");
13 menulist.selectedIndex = 0;
14 menulist.focus();
16 var result = "";
17 accessibilityController.addNotificationListener(function listener(element, notification) {
18 if (notification == "Focus") {
19 assert_equals(element.role, "AXRole: AXMenuListOption");
20 assert_equals(element.stringValue, "AXValue: Alicia");
21 t.done();
23 });
25 var axMenuList = accessibilityController.accessibleElementById("menulist");
26 eventSender.mouseMoveTo(axMenuList.x + 10, axMenuList.y + 10);
27 eventSender.mouseDown();
28 eventSender.mouseUp();
29 }, "menu list fires focus event on open");
30 </script>