Chromium Code Reviews| 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(String(htmlElement.clientWidth), String(innerWidth - 20)); | |
|
eae
2015/08/25 20:42:42
If you change this to
shouldBe("htmlElement.clien
skobes
2015/08/25 20:51:25
Done.
| |
| 23 shouldBe(String(htmlElement.clientHeight), String(innerHeight - 20)); | |
| 24 | |
| 25 htmlElement.scroll(10, 10); | |
| 26 shouldBe(String(scrollX), '10'); | |
| 27 shouldBe(String(scrollY), '10'); | |
| 28 | |
| 29 </script> | |
| OLD | NEW |