Index: LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html |
diff --git a/LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html b/LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..425766bd4cd3a05223a28d6f2d72f8c955418946 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html |
@@ -0,0 +1,41 @@ |
+<!DOCTYPE HTML> |
+<html> |
+<script src="../js/resources/js-test-pre.js"></script> |
+<head> |
+<style> |
+::-webkit-scrollbar { |
+ -webkit-appearance: none; |
+ width: 8px; |
+} |
+* { |
+ margin: 0; |
+ padding: 0; |
+} |
+ |
+#makespace { |
+ height: 5000px; |
+} |
+</style> |
+<script> |
+ description('Test that partial layout works with non-overlay scrollbars.'); |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ if (window.internals) |
+ window.internals.setUsesOverlayScrollbars(true); // We force non-overlay scrollbars with CSS. |
+ |
+ function checkSize() { |
+ var measure = document.getElementById('measure'); |
+ var measureWidth = measure.offsetWidth; // Partial layout occurs here! |
+ |
+ shouldBe(measureWidth, "document.body.offsetWidth"); |
+ shouldBe(measureWidth, "window.innerWidth - 8"); |
+ finishJSTest(); |
+ } |
+</script> |
+</head> |
+<body onload="checkSize()"> |
+<div id="makespace"></div> |
+<div id="measure"></div> |
+<script src="../js/resources/js-test-post.js"></script> |
+</body> |
+</html> |