Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / menu-list-optgroup.html
blob01bcc4399e9977f8a16c337d5316bc7addd353bf
1 <!DOCTYPE HTML>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <select id="menulist">
5 <option>Random Transformer</option>
6 <optgroup>
7 <option>Optimus Prime</option>
8 <option>Bumblebee</option>
9 <option>Jazz</option>
10 </optgroup>
11 <optgroup>
12 <option>Megatron</option>
13 <option>Starscream</option>
14 <option>Brawl</option>
15 </optgroup>
16 </select>
17 <script>
18 test(function(t)
20 var axMenuList = accessibilityController.accessibleElementById("menulist");
21 assert_equals(axMenuList.role, "AXRole: AXPopUpButton");
22 var axMenuListPopup = axMenuList.childAtIndex(0);
23 assert_equals(axMenuListPopup.role, "AXRole: AXMenuListPopup");
24 assert_equals(axMenuListPopup.childrenCount, 7);
25 for (var i = 0; i < axMenuListPopup.childrenCount; i++) {
26 assert_equals(axMenuListPopup.childAtIndex(i).role, "AXRole: AXMenuListOption");
28 }, "menu list optgroup options are accessible");
29 </script>