Index: LayoutTests/fast/scrolling/html-element-client-rect-excludes-scrollbars.html |
diff --git a/LayoutTests/fast/scrolling/html-element-client-rect-excludes-scrollbars.html b/LayoutTests/fast/scrolling/html-element-client-rect-excludes-scrollbars.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..01339636fba850a60fb5581a66a83c49206baa32 |
--- /dev/null |
+++ b/LayoutTests/fast/scrolling/html-element-client-rect-excludes-scrollbars.html |
@@ -0,0 +1,29 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<style> |
+::-webkit-scrollbar { |
+ width: 20px; |
+ height: 20px; |
+} |
+#space { |
+ height: 1000px; |
+ width: 1000px; |
+} |
+</style> |
+<div id="space"></div> |
+<script> |
+ |
+description( |
+ "Tests that the html element excludes scrollbars when reporting " + |
+ "clientWidth and clientHeight, and that it implements scroll() " + |
+ "by scrolling the frame."); |
+ |
+var htmlElement = document.documentElement; |
+shouldBe("htmlElement.clientWidth", "innerWidth - 20"); |
+shouldBe("htmlElement.clientHeight", "innerHeight - 20"); |
+ |
+htmlElement.scroll(10, 10); |
+shouldBe("scrollX", "10"); |
+shouldBe("scrollY", "10"); |
+ |
+</script> |