Chromium Code Reviews| Index: LayoutTests/fast/forms/select/popup-with-display-none-optgroup.html |
| diff --git a/LayoutTests/fast/forms/select/popup-with-display-none-optgroup.html b/LayoutTests/fast/forms/select/popup-with-display-none-optgroup.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8e1782f55e706c234e43d34c7f383dceb68202aa |
| --- /dev/null |
| +++ b/LayoutTests/fast/forms/select/popup-with-display-none-optgroup.html |
| @@ -0,0 +1,60 @@ |
| +<!DOCTYPE HTML> |
| +<script src='../../../resources/js-test.js'></script> |
| +<script src='../resources/common.js'></script> |
| +<script>description('Option Groups with display: none should not show the children option elements');</script> |
| + |
| +<select> |
| + <option>One</option> |
| + <option>Two</option> |
| + <option>Three</option> |
| + <optgroup label='Four-Five' style='display: none'> |
| + <option>Four</option> |
| + <option>Five</option> |
| + </optgroup> |
| + <option>Six</option> |
| + <option>Seven</option> |
| +</select> |
| + |
| +<select> |
| + <option>One</option> |
| + <option>Two</option> |
| + <option>Three</option> |
| + <optgroup label='Four-Five'> |
| + <option>Four</option> |
| + <option>Five</option> |
| + </optgroup> |
| + <option>Six</option> |
| + <option>Seven</option> |
| +</select> |
| + |
| + |
| +<script> |
| + |
| +if (window.eventSender) { |
| + |
| + var optgrp = document.querySelectorAll('optgroup'); |
| + var select = document.querySelectorAll('select'); |
| + |
| + select[1].focus(); |
| + eventSender.keyDown('downArrow', []); |
|
keishi
2014/08/06 03:00:20
nit: second argument can be removed
spartha
2014/08/06 08:13:31
Done.
|
| + eventSender.keyDown('downArrow', []); |
| + eventSender.keyDown('downArrow', []); |
| + shouldBeEqualToString('select[1].value', 'Four'); |
| + |
| + |
| + optgrp[1].style.display = 'none'; |
| + eventSender.keyDown('O', []); |
| + eventSender.keyDown('downArrow', []); |
| + eventSender.keyDown('downArrow', []); |
| + eventSender.keyDown('downArrow', []); |
| + shouldBeEqualToString('select[1].value', 'Six'); |
| + |
| + select[0].focus(); |
| + eventSender.keyDown('downArrow', []); |
| + eventSender.keyDown('downArrow', []); |
| + eventSender.keyDown('downArrow', []); |
| + shouldBeEqualToString('select[0].value', 'Six'); |
| + |
| +} |
| + |
| +</script> |