Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style type="text/css"> | 2 <style type="text/css"> |
| 3 | 3 |
| 4 .grid { | 4 .grid { |
| 5 display: grid; | 5 display: grid; |
| 6 position: relative; | 6 position: relative; |
| 7 width: 100px; /* Just to ensure a small number of repetitions. */ | |
|
Manuel Rego
2016/07/08 11:12:34
Nit: you could set also a height to have repetitio
| |
| 7 } | 8 } |
| 8 | 9 |
| 9 .emptyCols { grid-template-rows: 20px; } | 10 .emptyCols { grid-template-rows: 20px; } |
| 10 .emptyRows { grid-template-columns: 10px; } | 11 .emptyRows { grid-template-columns: 10px; } |
| 12 .emptyColsDueToAutoFit { grid-template-columns: repeat(auto-fit, [a] 20px [b]); } | |
| 13 .emptyRowsDueToAutoFit { grid-template-rows: repeat(auto-fit, [a] 20px [b]); } | |
| 14 .noRepetitionsCols { grid-template-columns: repeat(auto-fit, [a] 20px [b]) 10px 30px; } | |
| 15 .noRepetitionsRows { grid-template-rows: repeat(auto-fit, [a] 20px [b]) 10px 30p x; } | |
| 16 | |
| 11 | 17 |
| 12 .absposChild { | 18 .absposChild { |
| 13 position: absolute; | 19 position: absolute; |
| 14 } | 20 } |
| 15 | 21 |
| 16 </style> | 22 </style> |
| 17 | 23 |
| 18 | 24 |
| 19 <script> | 25 <script> |
| 20 function runTest() { | 26 function runTest() { |
| 21 description("This test checks that, getting the computed style of a grid wi th only absolutelly positioned children and no tracks in some axis, does not CRA SH on DEBUG builds."); | 27 description("This test checks that, getting the computed style of a grid wi th only absolutelly positioned children and no tracks in some axis, does not CRA SH on DEBUG builds."); |
| 22 testGridDefinitionsValues(document.getElementById("grid1"), "none", "20px") ; | 28 testGridDefinitionsValues(document.getElementById("grid1"), "none", "20px") ; |
| 23 testGridDefinitionsValues(document.getElementById("grid2"), "10px", "none") ; | 29 testGridDefinitionsValues(document.getElementById("grid2"), "10px", "none") ; |
| 24 testGridDefinitionsValues(document.getElementById("grid3"), "none", "none") ; | 30 testGridDefinitionsValues(document.getElementById("grid3"), "none", "none") ; |
| 31 testGridDefinitionsValues(document.getElementById("grid4"), "[a] 0px [b a] 0px [b a] 0px [b a] 0px [b a] 0px [b]", "none"); | |
| 32 testGridDefinitionsValues(document.getElementById("grid5"), "none", "[a] 0p x [b]"); | |
| 33 testGridDefinitionsValues(document.getElementById("grid6"), "[a] 0px [b a] 0px [b a] 0px [b] 10px 30px", "none"); | |
| 34 testGridDefinitionsValues(document.getElementById("grid7"), "none", "[a] 0p x [b] 10px 30px"); | |
| 25 } | 35 } |
| 26 </script> | 36 </script> |
| 27 <script src="../../resources/js-test.js"></script> | 37 <script src="../../resources/js-test.js"></script> |
| 28 <script src="resources/grid-definitions-parsing-utils.js"></script> | 38 <script src="resources/grid-definitions-parsing-utils.js"></script> |
| 29 | 39 |
| 30 <body onload="runTest()"> | 40 <body onload="runTest()"> |
| 31 | 41 |
| 32 <div id="grid1" class="grid emptyCols"><div class="absposChild"></div></div> | 42 <div id="grid1" class="grid emptyCols"><div class="absposChild"></div></div> |
| 33 | 43 |
| 34 <div id="grid2" class="grid emptyRows"><div class="absposChild"></div></div> | 44 <div id="grid2" class="grid emptyRows"><div class="absposChild"></div></div> |
| 35 | 45 |
| 36 <div id="grid3" class="grid"><div class="absposChild"></div></div> | 46 <div id="grid3" class="grid"><div class="absposChild"></div></div> |
| 37 | 47 |
| 48 <div id="grid4" class="grid emptyColsDueToAutoFit"><div class="absposChild"></di v></div> | |
| 49 <div id="grid5" class="grid emptyRowsDueToAutoFit"><div class="absposChild"></di v></div> | |
| 50 | |
| 51 <div id="grid6" class="grid noRepetitionsCols"><div class="absposChild"></div></ div> | |
| 52 <div id="grid7" class="grid noRepetitionsRows"><div class="absposChild"></div></ div> | |
| 53 | |
| 38 </body> | 54 </body> |
| OLD | NEW |