<!DOCTYPE html>
<html>
<head>
<script src="../../../../../resources/js-test-pre.js"></script>
<script src="resources/helpers.js"></script>
<style>* { margin: 0; padding: 0; }</style>
</head>
<body>
<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
<p id="description"></p>
<div id="console"></div>
<!-- Filler to allow scrolling -->
<div style="width:1500px;height:1500px;"></div>
<script>
description("This tests mouse event coordinates unscaled.");

var box = document.getElementById('box');
box.onmousedown = function(event) { debug('mousedown'); verifyCoordinates(event); }
box.onmouseup = function(event) { debug('mouseup'); verifyCoordinates(event); }
box.onclick = function(event) { debug('click'); verifyCoordinates(event); endTest(); }

function sendMouseSequence() {
    if (!window.eventSender) {
         debug("This test requires DumpRenderTree to send mouse events.");
         return;
    }

    setExpectedValues(125, 175, 125, 175);
    eventSender.mouseMoveTo(125, 175);
    eventSender.mouseDown();
    setExpectedValues(175, 125, 175, 125);
    eventSender.mouseMoveTo(175, 125);
    eventSender.mouseUp();
}

sendMouseSequence();

var successfullyParsed = true;
</script>
</body>
</html>
