Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / scrolling / html-element-client-rect-excludes-scrollbars.html
blob01339636fba850a60fb5581a66a83c49206baa32
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 ::-webkit-scrollbar {
5 width: 20px;
6 height: 20px;
8 #space {
9 height: 1000px;
10 width: 1000px;
12 </style>
13 <div id="space"></div>
14 <script>
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.");
21 var htmlElement = document.documentElement;
22 shouldBe("htmlElement.clientWidth", "innerWidth - 20");
23 shouldBe("htmlElement.clientHeight", "innerHeight - 20");
25 htmlElement.scroll(10, 10);
26 shouldBe("scrollX", "10");
27 shouldBe("scrollY", "10");
29 </script>