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..df19fe563f350f17390f3ab03333550040274207 |
--- /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(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.
|
+shouldBe(String(htmlElement.clientHeight), String(innerHeight - 20)); |
+ |
+htmlElement.scroll(10, 10); |
+shouldBe(String(scrollX), '10'); |
+shouldBe(String(scrollY), '10'); |
+ |
+</script> |