OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script src="../resources/common.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 |
| 9 <select id="select1" size=3> |
| 10 <option selected>a</option> |
| 11 <option style="display: none">b</option> |
| 12 <option>c</option> |
| 13 <option>d</option> |
| 14 </select> |
| 15 |
| 16 <select id="select2" size=3> |
| 17 <option selected>a</option> |
| 18 <option id="select2-b">b</option> |
| 19 <option>c</option> |
| 20 <option>d</option> |
| 21 </select> |
| 22 |
| 23 <select id="select3" size=3> |
| 24 <option selected>a</option> |
| 25 <option id='select3-b' style="display: none">b</option> |
| 26 <option>c</option> |
| 27 <option>d</option> |
| 28 </select> |
| 29 |
| 30 <script> |
| 31 document.getElementById('select2-b').style.display = 'none'; |
| 32 document.getElementById('select3-b').style.display = 'block'; |
| 33 |
| 34 description('Tests for select not showing option element with display: none'); |
| 35 |
| 36 var select1 = document.getElementById('select1'); |
| 37 select1.focus(); |
| 38 shouldBeEqualToString('select1.value', 'a'); |
| 39 eventSender.keyDown('downArrow'); |
| 40 shouldBeEqualToString('select1.value', 'c'); |
| 41 |
| 42 var select2 = document.getElementById('select2'); |
| 43 select2.focus(); |
| 44 shouldBeEqualToString('select2.value', 'a'); |
| 45 eventSender.keyDown('downArrow'); |
| 46 shouldBeEqualToString('select2.value', 'c'); |
| 47 |
| 48 var select3 = document.getElementById('select3'); |
| 49 select3.focus(); |
| 50 shouldBeEqualToString('select3.value', 'a'); |
| 51 eventSender.keyDown('downArrow'); |
| 52 shouldBeEqualToString('select3.value', 'b'); |
| 53 </script> |
| 54 |
| 55 </body> |
| 56 </html> |
OLD | NEW |