| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../resources/js-test.js"></script> |
| </head> |
| <body> |
| <div style="height:1000px"></div> |
| <select id="test1" multiple> |
| <option>foo</option> |
| <option>foo</option> |
| <option>foo</option> |
| <option>foo</option> |
| <option>foo</option> |
| <optgroup> |
| <option selected>bar</option> |
| </optgroup> |
| </select> |
| <script> |
| description('List boxes should be scrolled to show the selection when they are added but shouldn\'t scroll parent elements.'); |
| jsTestIsAsync = true; |
| window.onload = function() { |
| setTimeout(function() { |
| shouldBe('document.scrollingElement.scrollTop', '0'); |
| shouldBeGreaterThan('document.getElementById("test1").scrollTop', '0'); |
| |
| finishJSTest(); |
| }, 0); |
| }; |
| </script> |
| </body> |
| </html> |
| |