OLD | NEW |
(Empty) | |
| 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 childr
en option elements');</script> |
| 5 |
| 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> |
| 17 |
| 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> |
| 29 |
| 30 <script> |
| 31 |
| 32 if (window.eventSender) { |
| 33 |
| 34 var optgrp = document.querySelectorAll('optgroup'); |
| 35 var select = document.querySelectorAll('select'); |
| 36 |
| 37 select[1].focus(); |
| 38 eventSender.keyDown('downArrow'); |
| 39 eventSender.keyDown('downArrow'); |
| 40 eventSender.keyDown('downArrow'); |
| 41 shouldBeEqualToString('select[1].value', 'Four'); |
| 42 |
| 43 |
| 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'); |
| 50 |
| 51 select[0].focus(); |
| 52 eventSender.keyDown('downArrow'); |
| 53 eventSender.keyDown('downArrow'); |
| 54 eventSender.keyDown('downArrow'); |
| 55 shouldBeEqualToString('select[0].value', 'Six'); |
| 56 } |
| 57 |
| 58 </script> |
OLD | NEW |