| OLD | NEW |
| (Empty) |
| 1 <!doctype html> | |
| 2 <style> | |
| 3 .flex-container { | |
| 4 display: flex; | |
| 5 height:100px; | |
| 6 width:200px; | |
| 7 background-color:pink; | |
| 8 flex-wrap: wrap; | |
| 9 } | |
| 10 .flex-item1 { | |
| 11 width: 100%; | |
| 12 background-color:blue; | |
| 13 border:1px solid; | |
| 14 border-color:red; | |
| 15 } | |
| 16 .flex-item2 { | |
| 17 width: 100%; | |
| 18 background-color:blue; | |
| 19 } | |
| 20 </style> | |
| 21 <script src="../../resources/testharness.js"></script> | |
| 22 <script src="../../resources/testharnessreport.js"></script> | |
| 23 <script src="../../resources/check-layout-th.js"></script> | |
| 24 <body> | |
| 25 <script> | |
| 26 function runTest(gridEnabled) | |
| 27 { | |
| 28 if (window.internals) | |
| 29 internals.runtimeFlags.cssGridLayoutEnabled = gridEnabled; | |
| 30 | |
| 31 var flexContainer = document.createElement("div"); | |
| 32 if (gridEnabled) | |
| 33 flexContainer.className += "gridEnabled flex-container"; | |
| 34 else | |
| 35 flexContainer.className += "gridDisabled flex-container"; | |
| 36 document.body.appendChild(flexContainer); | |
| 37 | |
| 38 var flexItem1 = document.createElement("div"); | |
| 39 flexItem1.id = "flexItem1"; | |
| 40 flexItem1.className += "flex-item1"; | |
| 41 flexItem1.setAttribute("data-expected-height", "51"); | |
| 42 flexContainer.appendChild(flexItem1); | |
| 43 | |
| 44 var flexItem2 = document.createElement("div"); | |
| 45 flexItem2.id = "flexItem2"; | |
| 46 flexItem2.className += "flex-item2"; | |
| 47 flexItem2.setAttribute("data-expected-height", "49"); | |
| 48 flexContainer.appendChild(flexItem2); | |
| 49 | |
| 50 var br = document.createElement("br"); | |
| 51 document.body.appendChild(br); | |
| 52 | |
| 53 flexContainer.style.alignContent = "initial"; | |
| 54 | |
| 55 if (gridEnabled) | |
| 56 checkLayout('.gridEnabled'); | |
| 57 else | |
| 58 checkLayout('.gridDisabled'); | |
| 59 } | |
| 60 | |
| 61 runTest(false); | |
| 62 runTest(true); | |
| 63 </script> | |
| 64 <p>'Test for BUG=647694 - align-content "stretch" is not applied by default when
grid is disabled.'</p> | |
| 65 <div id="log"></div> | |
| 66 </body> | |
| OLD | NEW |