Index: LayoutTests/fast/css-grid-layout/grid-element-shink-to-fit.html |
diff --git a/LayoutTests/fast/css-grid-layout/grid-element-shink-to-fit.html b/LayoutTests/fast/css-grid-layout/grid-element-shink-to-fit.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..785b08565e9d5de760e68a7b97d454e45a9bc821 |
--- /dev/null |
+++ b/LayoutTests/fast/css-grid-layout/grid-element-shink-to-fit.html |
@@ -0,0 +1,83 @@ |
+<!DOCTYPE html> |
+<html> |
+<style> |
+.grid { |
+ display: grid; |
+ grid-template-columns: 200px 200px; |
+ grid-template-rows: 200px 200px; |
+} |
+ |
+#absolutePos { |
+ position: absolute; |
+} |
+ |
+#fixedPos { |
+ position: fixed; |
+} |
+ |
+#floatPos { |
+ float: left; |
+} |
+ |
+#one { |
+ color: blue; |
+ background: red; |
+ grid-column: 1; |
+ grid-row: 1; |
+} |
+ |
+#two { |
+ color: yellow; |
+ background: green; |
+ grid-column: 2; |
+ grid-row: 1; |
+} |
+#three { |
+ color: gray; |
+ background: pink; |
+ grid-column: 1; |
+ grid-row: 2; |
+} |
+#four { |
+ color: orange; |
+ background: brown; |
+ grid-column: 2; |
+ grid-row: 2; |
+} |
+</style> |
+<script src="../../resources/check-layout.js"></script> |
+<body onload="checkLayout('.grid')"> |
+ |
+<p>This test checks that the shirnk-to-fit behavior is applied when defining float or out-of-flow positioned elements.</p> |
+<p>The following grids should be 400px * 400px except the first one, which is 'relative' positioned</p> |
+ |
+<div class="grid" id="regularGrid" data-expected-height="400" data-expected-width="769"> |
+ <div class="gg" id="one"></div> |
Manuel Rego
2014/03/05 12:56:11
This "gg" class is undefined here. It doesn't seem
|
+ <div class="gg" id="two"></div> |
+ <div class="gg" id="three"></div> |
+ <div class="gg" id="four"></div> |
+</div> |
+ |
+<div class="grid" id="absolutePos" data-expected-height="400" data-expected-width="400"> |
+ <div class="gg" id="one"></div> |
+ <div class="gg" id="two"></div> |
+ <div class="gg" id="three"></div> |
+ <div class="gg" id="four"></div> |
+</div> |
+ |
+<div class="grid" id="fixedPos" data-expected-height="400" data-expected-width="400"> |
+ <div class="gg" id="one"></div> |
+ <div class="gg" id="two"></div> |
+ <div class="gg" id="three"></div> |
+ <div class="gg" id="four"></div> |
+</div> |
+ |
+<div class="grid" id="floatPos" data-expected-height="400" data-expected-width="400"> |
+ <div class="gg" id="one"></div> |
+ <div class="gg" id="two"></div> |
+ <div class="gg" id="three"></div> |
+ <div class="gg" id="four"></div> |
+</div> |
+ |
+</body> |
+</html> |