Chromium Code Reviews| 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 | |
| 31 <script> | |
| 32 | |
| 33 if (window.eventSender) { | |
| 34 | |
| 35 var optgrp = document.querySelectorAll('optgroup'); | |
| 36 var select = document.querySelectorAll('select'); | |
| 37 | |
| 38 select[1].focus(); | |
| 39 eventSender.keyDown('downArrow', []); | |
|
keishi
2014/08/06 03:00:20
nit: second argument can be removed
spartha
2014/08/06 08:13:31
Done.
| |
| 40 eventSender.keyDown('downArrow', []); | |
| 41 eventSender.keyDown('downArrow', []); | |
| 42 shouldBeEqualToString('select[1].value', 'Four'); | |
| 43 | |
| 44 | |
| 45 optgrp[1].style.display = 'none'; | |
| 46 eventSender.keyDown('O', []); | |
| 47 eventSender.keyDown('downArrow', []); | |
| 48 eventSender.keyDown('downArrow', []); | |
| 49 eventSender.keyDown('downArrow', []); | |
| 50 shouldBeEqualToString('select[1].value', 'Six'); | |
| 51 | |
| 52 select[0].focus(); | |
| 53 eventSender.keyDown('downArrow', []); | |
| 54 eventSender.keyDown('downArrow', []); | |
| 55 eventSender.keyDown('downArrow', []); | |
| 56 shouldBeEqualToString('select[0].value', 'Six'); | |
| 57 | |
| 58 } | |
| 59 | |
| 60 </script> | |
| OLD | NEW |