blob: 2316db9776555942e7b0e0b8254964514dcc655a [file] [log] [blame]
<html>
<head>
<style>
#table-row:hover {
background-color:blue;
}
</style>
<script>
function log(msg) {
var console = document.getElementById('console');
console.innerText = msg;
}
var testedHoverState = false;
function testHoverState() {
if (testedHoverState)
return;
testedHoverState = true;
var tableRow = document.getElementById('table-row');
var calculatedStyle = window.getComputedStyle(tableRow);
if (calculatedStyle.getPropertyValue('background-color') == "rgb(0, 0, 255)")
log("PASSED: The hover effect works!");
else
log("FAILED: The hover effect did not correctly propagate down the layer chain.");
}
function runTest() {
if (!window.layoutTestController)
return;
var targetElem = document.getElementById('table-row');
eventSender.mouseMoveTo(targetElem.offsetLeft + targetElem.offsetWidth / 2,
targetElem.offsetTop + targetElem.offsetHeight / 2);
}
</script>
</head>
<body onload="runTest()">
<div style="overflow:hidden">
<div id="table-row" onmousemove="testHoverState()" style="overflow:hidden; display:table-row">To test this manually, first make sure you can see this text at all, and then hover over it and make sure the background turns blue.</div>
</div>
<div id="console"></div>
</body>
</html>