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..74ce6ecf232addf5445be65110dcb876bbbc7df4 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/select/popup-with-display-none-optgroup.html |
@@ -0,0 +1,58 @@ |
+<!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'); |
+ 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> |