<!DOCTYPE html>
<script src="resources/link-highlight-helper.js"></script>
<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
<body onload="runTest();">
<div style="will-change: transform; position: relative; left: 10; top: 40; filter:opacity(10%);">
<a class="opaqueHighlight" href="" id="targetLink">Target Link.</a>
</div>
<div style="position: relative; left: 10; top: 70">
This test is successful if "Target Link" above is covered in a fully-opaque green rectangle with square corners.
</div>
<script>
function runTest() {
useMockHighlight();
var clientRect = document.getElementById('targetLink').getBoundingClientRect();
x = (clientRect.left + clientRect.right) / 2;
y = (clientRect.top + clientRect.bottom) / 2;
if (window.testRunner)
testRunner.waitUntilDone();
if (window.eventSender) {
eventSender.gestureShowPress(x, y);
requestAnimationFrame(function() { testRunner.notifyDone(); });
} else {
debug("This test requires DumpRenderTree.");
}
}
</script>