<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/hover-active-quirks-utility.js"></script>
<style id="testStyle">
</style>
</head>
<body>
<div id="target" class="aClass otherClass" webkit="rocks" style="background-color:green; width:200px; height:200px;"></div>
<div id="console"></div>
</div>
</body>
<script>
description('Test the :active:hover selector when the document is in quirks mode. To test manually, move the cursor over the green rectangle and press a mouse button until the test is finished.');


if (window.eventSender) {
    var target = document.getElementById('target');
    var x = target.offsetLeft + target.offsetWidth / 2;
    var y = target.offsetTop + target.offsetHeight / 2;
    eventSender.mouseMoveTo(x, y);
    eventSender.mouseDown();
    test(':active:hover');
    eventSender.mouseUp()
} else {
    // For some reasons, the test does not work well without the timeout on Firefox.
    var target = document.getElementById('target');
    target.addEventListener('mousedown', function() { setTimeout(test, 250, ':active:hover'); });
}

</script>
<script src="../../resources/js-test-post.js"></script>
</html>
