<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
<script src="resources/link-highlight-helper.js"></script>
</head>
<body onload="runTest();">
<div style="transform: scaleY(2); position: absolute; left: 40px; top: 80px;">
<a href="" id="link1">Link 1</a></br>
<a class="opaqueHighlight" href="" id="targetLink">Target Link.</a><br>
<a href="" id="link2">Link 2</a>
</div>
</div>
<div style="position: relative; left: 10px; top: 200px; will-change: transform;">
This test is successful if "Target Link" above is covered in a 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);
window.setTimeout(function() { testRunner.notifyDone(); }, 0);
} else {
debug("This test requires DumpRenderTree.");
}
}
</script>
</script>
</body>
</html>