blob: a470918625e184cc167d20651f85830c85368fd5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<link rel="stylesheet" href="resources/link-highlight-style.css">
</head>
<body onload="runTest();">
<div style="position: absolute; left: 40px; top: 40px; transform: rotate(22.5deg)">
<a href="" id="link1">Link 1</a><br>
<a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0.5);">Target Link.</a><br>
<a href="" id="link2">Link 2</a>
</div>
</div>
<div style="position: absolute; left: 10px; top: 110px; will-change: transform;">
This test is successful if "Target Link" above is covered in a green rectangle with rounded corners.
</div>
<script>
function runTest() {
var clientRect = document.getElementById('targetLink').getBoundingClientRect();
x = (clientRect.left + clientRect.right) / 2;
y = (clientRect.top + clientRect.bottom) / 2;
if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults();
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>