Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-padding.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-padding.html b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-padding.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f5e79ab3644fa54fd493fcee1a69224e0a3aba77 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-padding.html |
| @@ -0,0 +1,120 @@ |
| +<!DOCTYPE html> |
| +<html> |
|
svillar
2016/01/19 12:04:51
Don't need this, actually there is no </html>
|
| +<link href="resources/grid.css" rel="stylesheet"> |
| +<style> |
| + |
| +.grid { |
| + grid-template-columns: 100px 200px; |
| + grid-template-rows: 50px 150px; |
| + width: 500px; |
| + height: 300px; |
| + border: 5px solid black; |
| + margin: 30px; |
| + padding: 15px; |
| + /* Ensures that the grid container is the containing block of the absolutely positioned grid children. */ |
| + position: relative; |
| +} |
| + |
| +.absolute { |
| + position: absolute; |
| + top: 0; |
| + left: 0; |
| + width: 100%; |
| + height: 100%; |
| + background: lime; |
| +} |
| + |
| +</style> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../../resources/check-layout-th.js"></script> |
| +<body onload="checkLayout('.grid')"> |
| +<div id="log"></div> |
| + |
| +<p>This test checks that positioned grid items can be placed directly on the padding.</p> |
| + |
| +<div class="grid"> |
| + <div class="absolute" style="grid-column: auto / 1; grid-row: auto / 1;" |
| + data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: 1 / 2; grid-row: auto / 1;" |
| + data-offset-x="15" data-offset-y="0" data-expected-width="100" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: auto / 1; grid-row: 1 / 2;" |
| + data-offset-x="0" data-offset-y="15" data-expected-width="15" data-expected-height="50"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / auto; grid-row: 3 / auto;" |
| + data-offset-x="315" data-offset-y="215" data-expected-width="215" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 2 / 3; grid-row: 3 / auto;" |
| + data-offset-x="115" data-offset-y="215" data-expected-width="200" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / auto; grid-row: 2 / 3;" |
| + data-offset-x="315" data-offset-y="65" data-expected-width="215" data-expected-height="150"> |
| + </div> |
| +</div> |
| + |
| +<div class="grid"> |
| + <div class="absolute" style="grid-column: -5 / 1; grid-row: -5 / 1;" |
| + data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: 1 / 2; grid-row: -5 / 1;" |
| + data-offset-x="15" data-offset-y="0" data-expected-width="100" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: -5 / 1; grid-row: 1 / 2;" |
| + data-offset-x="0" data-offset-y="15" data-expected-width="15" data-expected-height="50"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / 5; grid-row: 3 / 5;" |
| + data-offset-x="315" data-offset-y="215" data-expected-width="215" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 2 / 3; grid-row: 3 / 5;" |
| + data-offset-x="115" data-offset-y="215" data-expected-width="200" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / 5; grid-row: 2 / 3;" |
| + data-offset-x="315" data-offset-y="65" data-expected-width="215" data-expected-height="150"> |
| + </div> |
| +</div> |
| + |
| +<div class="grid"> |
| + <div class="absolute" style="grid-column: span 2 / 1; grid-row: span 2 / 1;" |
| + data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: 1 / 2; grid-row: span 2 / 1;" |
| + data-offset-x="15" data-offset-y="0" data-expected-width="100" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: span 2 / 1; grid-row: 1 / 2;" |
| + data-offset-x="0" data-offset-y="15" data-expected-width="15" data-expected-height="50"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / span 2; grid-row: 3 / span 2;" |
| + data-offset-x="315" data-offset-y="215" data-expected-width="215" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 2 / 3; grid-row: 3 / span 2;" |
| + data-offset-x="115" data-offset-y="215" data-expected-width="200" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / span 2; grid-row: 2 / 3;" |
| + data-offset-x="315" data-offset-y="65" data-expected-width="215" data-expected-height="150"> |
| + </div> |
| +</div> |
| + |
| +<div class="grid"> |
| + <div class="absolute" style="grid-column: foo / 1; grid-row: foo / 1;" |
| + data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: 1 / 2; grid-row: foo / 1;" |
| + data-offset-x="15" data-offset-y="0" data-expected-width="100" data-expected-height="15"> |
| + </div> |
| + <div class="absolute" style="grid-column: foo / 1; grid-row: 1 / 2;" |
| + data-offset-x="0" data-offset-y="15" data-expected-width="15" data-expected-height="50"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / foo; grid-row: 3 / foo;" |
| + data-offset-x="315" data-offset-y="215" data-expected-width="215" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 2 / 3; grid-row: 3 / foo;" |
| + data-offset-x="115" data-offset-y="215" data-expected-width="200" data-expected-height="115"> |
| + </div> |
| + <div class="absolute" style="grid-column: 3 / foo; grid-row: 2 / 3;" |
| + data-offset-x="315" data-offset-y="65" data-expected-width="215" data-expected-height="150"> |
| + </div> |
| +</div> |
| + |
| +</body> |