<!DOCTYPE html>
<html>
<head>
    <script src="../../resources/js-test-pre.js"></script>
    
    <style>
        body {
            height: 2000px;
        }

        button {
            position: absolute;
            top: 400px;
            left: 20px;
            height: 100px;
            width: 200px;
        }
    </style>
    <script>
        function buttonClicked(event)
        {
            shouldBe('event.clientX', '120');
            shouldBe('event.clientY', '200');
        }
    </script>
</head>
<body>

<button onclick="buttonClicked(event)">Click me</button>
<script>
    if (window.eventSender)
        eventSender.zoomPageIn();

    window.scrollTo(0, 250);

    var button = document.getElementsByTagName('button')[0];
    button.focus();
    
    if (window.eventSender)
        eventSender.keyDown(" "); // Activate the button
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
