3 <link href=
"resources/grid.css" rel=
"stylesheet"/>
9 grid-template-columns: auto auto;
11 .gridFixedMinContentFixedMaxContent {
12 grid-template-columns: minmax(
50px, min-content) minmax(
40px, max-content);
14 .gridMaxContentAndAuto {
15 grid-template-columns: max-content auto;
17 .gridMinContentAndAuto {
18 grid-template-columns: min-content auto;
21 <script src=
"../../resources/js-test.js"></script>
24 <div class=
"grid gridAutoAndAuto" id=
"gridAutoAndAuto">
25 <div class=
"firstRowFirstColumn">X
</div>
26 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
29 <div class=
"grid gridAutoAndAuto" id=
"gridAutoAndAutoReversed">
30 <div class=
"firstRowSecondColumn">X
</div>
31 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
34 <div class=
"grid gridFixedMinContentFixedMaxContent" id=
"gridFixedMinContentFixedMaxContent">
35 <div class=
"sizedToGridArea firstRowFirstColumn"></div>
36 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
39 <div class=
"grid gridFixedMinContentFixedMaxContent" id=
"gridFixedMinContentFixedMaxContentTwoEmptyChildren">
40 <div class=
"sizedToGridArea firstRowFirstColumn"></div>
41 <div class=
"sizedToGridArea firstRowSecondColumn"></div>
42 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
45 <div class=
"grid gridFixedMinContentFixedMaxContent" id=
"gridFixedMinContentFixedMaxContentFixedSizeChild">
46 <div class=
"firstRowFirstColumn">XXXXXX
</div>
47 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
50 <div class=
"grid gridMaxContentAndAuto" id=
"gridMaxContentAndAuto">
51 <div class=
"firstRowFirstColumn">X
</div>
52 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
55 <div class=
"grid gridMaxContentAndAuto" id=
"gridMaxContentAndAutoReversed">
56 <div class=
"firstRowSecondColumn">X
</div>
57 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
60 <div class=
"grid gridMinContentAndAuto" id=
"gridMinContentAndAuto">
61 <div class=
"firstRowFirstColumn">X
</div>
62 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
65 <div class=
"grid gridMinContentAndAuto" id=
"gridMinContentAndAutoReversed">
66 <div class=
"firstRowSecondColumn">X
</div>
67 <div class=
"firstRowBothColumn">XXX XX XXX
</div>
71 function testGridColumnsValues(id
, computedColumnValue
)
73 shouldBeEqualToString("window.getComputedStyle(" + id
+ ", '').getPropertyValue('grid-template-columns')", computedColumnValue
);
76 description('This test checks that content sized tracks are initialized using non-spanning grid items.');
78 testGridColumnsValues("gridAutoAndAuto", "10px 90px");
79 testGridColumnsValues("gridAutoAndAutoReversed", "90px 10px");
80 testGridColumnsValues("gridFixedMinContentFixedMaxContent", "50px 50px");
81 testGridColumnsValues("gridFixedMinContentFixedMaxContentTwoEmptyChildren", "50px 50px");
82 testGridColumnsValues("gridFixedMinContentFixedMaxContentFixedSizeChild", "60px 40px");
83 testGridColumnsValues("gridMaxContentAndAuto", "80px 20px");
84 testGridColumnsValues("gridMaxContentAndAutoReversed", "90px 10px");
85 testGridColumnsValues("gridMinContentAndAuto", "10px 90px");
86 testGridColumnsValues("gridMinContentAndAutoReversed", "20px 80px");