Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: LayoutTests/fast/forms/select/popup-with-display-none-optgroup.html

Issue 415343003: Option Groups with display: none should not show the children option elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed assert failure in linux dbg build Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « LayoutTests/NeverFixTests ('k') | LayoutTests/fast/forms/select/popup-with-display-none-optgroup-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698