Index: LayoutTests/fast/css-grid-layout/grid-container-width-should-include-scroll-bar-width.html |
diff --git a/LayoutTests/fast/css-grid-layout/grid-container-width-should-include-scroll-bar-width.html b/LayoutTests/fast/css-grid-layout/grid-container-width-should-include-scroll-bar-width.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ea712ab54bc9303b32e40c7857d30f0dadd7810d |
--- /dev/null |
+++ b/LayoutTests/fast/css-grid-layout/grid-container-width-should-include-scroll-bar-width.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE html> |
+<link href='resources/grid.css' rel='stylesheet'> |
+<style> |
+.grid, .inline-grid { |
+ width: -webkit-fit-content; |
+ width: -moz-fit-content; |
+ width: -ie-fit-content; |
+ width: fit-content; |
+ overflow: scroll; |
+} |
+.gridItem { |
+ width: 100px; |
+ height: 100px; |
+ background: green; |
+} |
+</style> |
+<script src='../../resources/check-layout.js'></script> |
+ |
+<body onload="checkLayout('.grid'); checkLayout('.inline-grid');"> |
+ |
+Test that scrollbar width is added to the width of the grid container. |
+<div class='grid' data-expected-width='115'> |
+ <span class='gridItem'></span> |
+</div> |
+<div class='grid' style='left: 150px; overflow-y: hidden' data-expected-width='100'> |
+ <span class='gridItem'></span> |
+</div> |
+<div class='inline-grid' style='left: 300px' data-expected-width='115'> |
+ <span class='gridItem'></span> |
+</div> |
+<div class='inline-grid' style='left: 450px; overflow-y: hidden' data-expected-width='100'> |
+ <span class='gridItem'></span> |
+</div> |
+</body> |