| <!DOCTYPE html> |
| <html> |
| <style> |
| body { |
| margin: 0; |
| } |
| .horizontal-box { |
| display: -webkit-flex; |
| } |
| .horizontal-box div { |
| height: 30px; |
| border: 0; |
| margin-bottom: 10px; |
| -webkit-flex: 1; |
| } |
| |
| .first { |
| background-color: #0f0; |
| } |
| .second { |
| background-color: #0d0; |
| } |
| .third { |
| background-color: #090; |
| } |
| .fourth { |
| background-color: #060; |
| } |
| .fifth { |
| background-color: #030; |
| } |
| </style> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(true); |
| </script> |
| <body> |
| |
| <div class="horizontal-box"> |
| <div class="first" style="-webkit-order: 0"></div> |
| <div class="second" style=""></div> |
| <div class="third" style="-webkit-order: 3"></div> |
| <div class="fourth" style="-webkit-order: 20"></div> |
| </div> |
| |
| <div class="horizontal-box"> |
| <div class="fourth" style="-webkit-order: 4"></div> |
| <div class="third" style="-webkit-order: 3"></div> |
| <div class="second" style="-webkit-order: 2"></div> |
| <div class="first" style="-webkit-order: 1"></div> |
| </div> |
| |
| <!-- The example from the spec. --> |
| <div class="horizontal-box"> |
| <div class="third" style="-webkit-order: 1"></div> |
| <div class="first" style=""></div> |
| <div class="fourth" style="-webkit-order: 1"></div> |
| <div class="second" style="-webkit-order: 0"></div> |
| </div> |
| |
| <div class="horizontal-box"> |
| <div class="fourth" style="-webkit-order: 2"></div> |
| <div class="second" style=""></div> |
| <div class="third" style=""></div> |
| <div class="first" style="-webkit-order: -10"></div> |
| </div> |
| |
| <div class="horizontal-box"> |
| <div class="fourth" style="-webkit-order: 2000000000"></div> |
| <div class="second" style="-webkit-order: 1000000000"></div> |
| <div class="third" style="-webkit-order: 1000000000"></div> |
| <div class="first" style="-webkit-order: -1000000000"></div> |
| </div> |
| |
| <!-- Floating numbers are ignored and we use the default of 1 instead. --> |
| <div class="horizontal-box"> |
| <div class="second" style="-webkit-order: 2.5"></div> |
| <div class="fourth" style="-webkit-order: 2"></div> |
| <div class="first" style="-webkit-order: -1"></div> |
| <div class="third" style=""></div> |
| </div> |
| |
| <div class="horizontal-box"> |
| <div class="second" style="-webkit-order: 0"></div> |
| <div class="first" style="-webkit-order: -1"></div> |
| <div class="fourth" style="-webkit-order: 1"></div> |
| <div class="third" style=""></div> |
| </div> |
| |
| <!-- Values greater than what can be stored in an int are clamped from |
| -2,147,483,646 (int min + 2) to 2,147,483,647. --> |
| <div class="horizontal-box"> |
| <div class="third" style="-webkit-order: 4000000000"></div> |
| <div class="fourth" style="-webkit-order: 3000000000"></div> |
| <div class="first" style=""></div> |
| <div class="second" style="-webkit-order: 2147483646"></div> |
| </div> |
| |
| <div class="horizontal-box"> |
| <div class="second" style="-webkit-order: 4000000000"></div> |
| <div class="third" style="-webkit-order: 3000000000"></div> |
| <div class="first" style=""></div> |
| <div class="fourth" style="-webkit-order: 2147483647"></div> |
| </div> |
| |
| <div class="horizontal-box"> |
| <div class="third" style="-webkit-order: -2147483645"></div> |
| <div class="first" style="-webkit-order: -2147483646"></div> |
| <div class="second" style="-webkit-order: -2147483647"></div> |
| <div class="fourth" style=""></div> |
| </div> |
| |
| <!-- This should not crash. --> |
| <div class="horizontal-box"></div> |
| |
| <div style="position:absolute; left: -10000px;">You should see identical green bars going from light green |
| (left) to dark green (right).</div> |
| |
| </body> |
| </html> |