Selects don't scroll at some aspect ratios
[WebKit-https.git] / LayoutTests / fast / forms / listbox-visible-size.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5     <style>
6         select {
7             width: 12em;
8         }
9     </style>
10     <script src="../../resources/js-test-pre.js"></script>
11 </head>
12 <body>
13     <select id="select" size="5">
14         <option>Monday</option>
15         <option>Tuesday</option>
16         <option>Wednesday</option>
17         <option>Thursday</option>
18         <option>Friday</option>
19         <option>Saturday</option>
20         <option>Sunday</option>
21     </select>
22     <script>
23     const targetTop = 28;
24     var select;
25     function scrollSelect(newTop)
26     {
27         var select = document.getElementById('select');
28         select.scrollTop = newTop;
29     }
30
31     scrollSelect(targetTop);
32     shouldBe('select.scrollTop', 'targetTop');
33     </script>
34     <script src="../../resources/js-test-post.js"></script>
35 </body>
36 </html>