chromium/third_party/blink/web_tests/fast/block/positioning/positioned-movement-layout-when-height-changes.html

<!DOCTYPE HTML>
<style>
    body {
        margin: 0;
    }
    #container {
        position: absolute;
        top: 0px;
        bottom: 0px;
        left: 0px;
        right: 0px;
        overflow: hidden;
    }
    #test {
        position: absolute;
        top: 0px;
        bottom: 500px;
        left: 140px;
        right: 540px;
        overflow: hidden;
    }
    .contents {
        display: inline-block;
        background-color: green;
        height: 100px;
        width: 100px;
        overflow: hidden;
    }
</style>
<script>

    function addChildren(test)
    {
        for (i = 0; i < 20; i++) {
            box = document.createElement("div");
            box.setAttribute('class', 'contents');
            box.setAttribute('id', i);
            test.appendChild(box);
        }
    }

    function runTest()
    {
        test = document.getElementById("test");
        addChildren(test);

        for (i = 0; i < 20; i++) {
            box = document.getElementById(i);
            test.removeChild(box);
        }
        document.body.offsetTop;

        addChildren(test);
        document.body.offsetTop;

        test.style['top'] = '300px';
    }
    window.onload = runTest;
</script>
<div id="top">
<div id="container">
    <div id="test"></div>
</div>
</div>
Tests positioned movement layout when its height has changed.