| <!DOCTYPE html> | |
| <html> | |
| <style> | |
| body { | |
| margin: 0; | |
| } | |
| .flexbox { | |
| display: -webkit-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 { | |
| -webkit-flex: 1 auto; | |
| } | |
| .noflex .row :nth-child(1) { | |
| width: 50px; | |
| -webkit-flex: none; | |
| } | |
| .column { | |
| -webkit-flex-direction: column; | |
| width: 200px; | |
| height: 200px; | |
| } | |
| .column div { | |
| -webkit-flex: 1 auto; | |
| } | |
| .noflex .column :nth-child(1) { | |
| height: 50px; | |
| -webkit-flex: none; | |
| } | |
| </style> | |
| <script> | |
| if (window.testRunner) | |
| testRunner.dumpAsText(); | |
| function runTest() | |
| { | |
| document.body.className = "noflex"; | |
| checkLayout('.flexbox'); | |
| } | |
| </script> | |
| <script src="../../resources/check-layout.js"></script> | |
| <body onload="runTest()"> | |
| <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> |