| <!DOCTYPE html> |
| |
| <style> |
| #flex { |
| display: flex; |
| position: relative; |
| background: red; |
| width: 500px; |
| height: 200px; |
| } |
| |
| #item { |
| background: green; |
| left: 0; |
| right: 0; |
| top: 0; |
| bottom: 0; |
| } |
| </style> |
| |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <script src="../../resources/check-layout-th.js"></script> |
| |
| <script> |
| function update() { |
| var item = document.getElementById("item"); |
| item.offsetHeight; |
| item.style.position = "absolute"; |
| item.offsetHeight; |
| checkLayout("#flex"); |
| } |
| </script> |
| |
| <body onload="update();"> |
| |
| <div id="flex"> |
| <div id="item" data-expected-width="500"></div> |
| </div> |