OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <style> |
| 4 ::-webkit-scrollbar { |
| 5 width: 20px; |
| 6 height: 20px; |
| 7 } |
| 8 #space { |
| 9 height: 1000px; |
| 10 width: 1000px; |
| 11 } |
| 12 </style> |
| 13 <div id="space"></div> |
| 14 <script> |
| 15 |
| 16 description( |
| 17 "Tests that the html element excludes scrollbars when reporting " + |
| 18 "clientWidth and clientHeight, and that it implements scroll() " + |
| 19 "by scrolling the frame."); |
| 20 |
| 21 var htmlElement = document.documentElement; |
| 22 shouldBe("htmlElement.clientWidth", "innerWidth - 20"); |
| 23 shouldBe("htmlElement.clientHeight", "innerHeight - 20"); |
| 24 |
| 25 htmlElement.scroll(10, 10); |
| 26 shouldBe("scrollX", "10"); |
| 27 shouldBe("scrollY", "10"); |
| 28 |
| 29 </script> |
OLD | NEW |