<html>
<head>
    <script type="text/javascript">
        function test()
        {
            if (window.layoutTestController)
                layoutTestController.waitUntilDone();

            document.body.offsetTop;
            setTimeout(function() {
                document.body.rows = "200,*";
                if (window.layoutTestController)
                    layoutTestController.notifyDone();
            }, 0);
        }
    </script>
</head>
<frameset rows="100,*" onload="test()">
    <frame src="data:text/html,
        <p>
            Test for <i><a href='https://bugs.webkit.org/show_bug.cgi?id=19348'>https://bugs.webkit.org/show_bug.cgi?id=19348</a>
            REGRESSION (r34193): Setting the size of a frame with javascript  document.body.row no longer works</i>.
        </p>
        <p>
            This frame should be 200px tall.
        </p>
        <div style='position: absolute; width: 100px; height: 100px; background-color: green; left: 0; top: 100px;'></div>
    ">
    <frame>
</frameset>
</html>
