<body style="height: 2000px;">
    <div style="height: 150px;">
        <div style="position: relative; top: 50px;">
            <div id="target" onclick="fail()" style="float: left; background-color: rgba(0, 0, 0, 0.5); width: 100px; height: 100px;"></div>
        </div>
    </div>
    <script>document.body.offsetTop;</script>
    <div></div>
    <script>
        function fail()
        {
            document.getElementById("target").style.backgroundColor = "red";
        }

        if (window.testRunner) {
            eventSender.mouseMoveTo(25, 25);
            eventSender.mouseDown();
            eventSender.mouseUp();
        }
    </script>
</body>
