| <!DOCTYPE html> |
| <html> |
| <style> |
| body { |
| margin: 0; |
| } |
| .flexbox { |
| display: flex; |
| background-color: #aaa; |
| position: relative; |
| } |
| .flexbox :nth-child(1) { |
| background-color: blue; |
| } |
| .flexbox :nth-child(2) { |
| background-color: green; |
| } |
| |
| .row { |
| width: 200px; |
| height: 200px; |
| } |
| .row div { |
| flex: 1 auto; |
| } |
| .noflex .row :nth-child(1) { |
| width: 50px; |
| flex: none; |
| } |
| |
| .column { |
| flex-direction: column; |
| width: 200px; |
| height: 200px; |
| } |
| .column div { |
| flex: 1 auto; |
| } |
| .noflex .column :nth-child(1) { |
| height: 50px; |
| flex: none; |
| } |
| |
| </style> |
| <script> |
| function runTest() |
| { |
| document.body.className = "noflex"; |
| checkLayout('.flexbox'); |
| } |
| </script> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <script src="../../resources/check-layout-th.js"></script> |
| <body onload="runTest()"> |
| <div id=log></div> |
| |
| <div class="flexbox row"> |
| <div data-expected-width="50"></div> |
| <div data-expected-width="150"></div> |
| </div> |
| |
| <div class="flexbox column"> |
| <div data-expected-height="50"></div> |
| <div data-expected-height="150"></div> |
| </div> |
| |
| </body> |
| </html> |