Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / popup-with-display-none-optgroup.html
blob74ce6ecf232addf5445be65110dcb876bbbc7df4
1 <!DOCTYPE HTML>
2 <script src='../../../resources/js-test.js'></script>
3 <script src='../resources/common.js'></script>
4 <script>description('Option Groups with display: none should not show the children option elements');</script>
6 <select>
7 <option>One</option>
8 <option>Two</option>
9 <option>Three</option>
10 <optgroup label='Four-Five' style='display: none'>
11 <option>Four</option>
12 <option>Five</option>
13 </optgroup>
14 <option>Six</option>
15 <option>Seven</option>
16 </select>
18 <select>
19 <option>One</option>
20 <option>Two</option>
21 <option>Three</option>
22 <optgroup label='Four-Five'>
23 <option>Four</option>
24 <option>Five</option>
25 </optgroup>
26 <option>Six</option>
27 <option>Seven</option>
28 </select>
30 <script>
32 if (window.eventSender) {
34 var optgrp = document.querySelectorAll('optgroup');
35 var select = document.querySelectorAll('select');
37 select[1].focus();
38 eventSender.keyDown('downArrow');
39 eventSender.keyDown('downArrow');
40 eventSender.keyDown('downArrow');
41 shouldBeEqualToString('select[1].value', 'Four');
44 optgrp[1].style.display = 'none';
45 eventSender.keyDown('O');
46 eventSender.keyDown('downArrow');
47 eventSender.keyDown('downArrow');
48 eventSender.keyDown('downArrow');
49 shouldBeEqualToString('select[1].value', 'Six');
51 select[0].focus();
52 eventSender.keyDown('downArrow');
53 eventSender.keyDown('downArrow');
54 eventSender.keyDown('downArrow');
55 shouldBeEqualToString('select[0].value', 'Six');
58 </script>