blob: a020276175b088cd3720c2a7ef2cfc691ada5143 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/hover-active-strict-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 selector when the document is in strict 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');
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'); });
}
</script>
<script src="../../resources/js-test-post.js"></script>
</html>