blob: 54f728217514e20b21ad479f2443eb939466ff78 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/not-hover-active-strict-utility.js"></script>
<style id="testStyle">
</style>
</head>
<body>
<testing id="target" class="aClass otherClass" webkit="rocks" style="background-color:green; width:200px; height:200px;display:block;"></testing>
<div id="start" style="background-color:gray; height:200px; width:200px; display:block; text-align:center; color:white;">START</div>
<div id="console"></div>
</div>
</body>
<script>
description('Test the :not(:active) and :not(:hover) selector when the document is in strict mode. To test manually, make sure not to move the cursor over the green rectangle and press the gray START div until the test is finished.');
if (window.eventSender) {
var start = document.getElementById('start');
var x = start.offsetLeft + start.offsetWidth / 2;
var y = start.offsetTop + start.offsetHeight / 2;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
test(':active');
test(':hover');
eventSender.mouseUp()
} else {
// For some reasons, the test does not work well without the timeout on Firefox.
document.getElementById('start').addEventListener('mousedown', function(ev) {
setTimeout(function () {
test(':active');
test(':hover');
}, 250);
});
}
</script>
<script src="../../resources/js-test-post.js"></script>
</html>