| <div style="position: relative; height: 200px; overflow: auto;"> |
| <div id="target" style="height: 75%; background-color: red;"></div> |
| testRunner.waitUntilDone(); |
| window.onload = function () { |
| // Force a layout with offsetHeight, and then start toggling overflow. |
| var target = document.getElementById("target"); |
| var result = document.getElementById("result"); |
| result.innerHTML = "PASS"; |
| result.innerHTML = "FAIL"; |
| function toggleOverflow() |
| // The code change associated with this test will cause this function to start |
| // firing asynchronously. |
| if (recursionDepth > 2) { |
| // If we have made it this far without a recursionDepth of 2 or greater, then we |
| // can say that the test passed. |
| if (target.style.height === "75%") |
| target.style.height = "200%"; |
| target.style.height = "75%"; |
| target.parentNode.addEventListener("overflowchanged", toggleOverflow); |