OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <div style="height:1000px"></div> | 7 <div style="height:1000px"></div> |
8 <select id="test1" multiple> | 8 <select id="test1" multiple> |
9 <option>foo</option> | 9 <option>foo</option> |
10 <option>foo</option> | 10 <option>foo</option> |
11 <option>foo</option> | 11 <option>foo</option> |
12 <option>foo</option> | 12 <option>foo</option> |
13 <option>foo</option> | 13 <option>foo</option> |
14 <optgroup> | 14 <optgroup> |
15 <option selected>bar</option> | 15 <option selected>bar</option> |
16 </optgroup> | 16 </optgroup> |
17 </select> | 17 </select> |
18 <script> | 18 <script> |
19 description('List boxes should be scrolled to show the selection when they are a
dded but shouldn\'t scroll parent elements.'); | 19 description('List boxes should be scrolled to show the selection when they are a
dded but shouldn\'t scroll parent elements.'); |
20 jsTestIsAsync = true; | 20 jsTestIsAsync = true; |
21 window.onload = function() { | 21 window.onload = function() { |
22 shouldBe('document.body.scrollTop', '0'); | 22 shouldBe('document.scrollingElement.scrollTop', '0'); |
23 shouldBeGreaterThan('document.getElementById("test1").scrollTop', '0'); | 23 shouldBeGreaterThan('document.getElementById("test1").scrollTop', '0'); |
24 | 24 |
25 finishJSTest(); | 25 finishJSTest(); |
26 }; | 26 }; |
27 </script> | 27 </script> |
28 </body> | 28 </body> |
29 </html> | 29 </html> |
30 | 30 |
OLD | NEW |