chromium/third_party/blink/web_tests/compositing/gestures/gesture-tapHighlight-simple-background.html

<!DOCTYPE html>
<html>
<head>
<script src="resources/link-highlight-helper.js"></script>
<link rel="stylesheet" href="resources/link-highlight-style.css">
</head>
<body onload="runTest();">
<div style="will-change: transform; position: relative; left: 10px; top: 40px">
<a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0.5)">Target Link.</a>
</div>
<div style="position: relative; left: 10px; top: 70px">
This test is successful if no link highlight appears (in particular, the entire viewport should remain unchanged, and the background
should be white and not grey).
</div>
<script>
// This test makes sure a GestureShowPress event on the page background doesn't "highlight" the entire viewport.
function runTest() {
    // To enable the 'bad behaviour' we are testing, the LayoutView must be able to respond to mouse clicks.
    document.addEventListener("click", function(evt) { });
    var clientRect = document.getElementById('targetLink').getBoundingClientRect();
    x = 150; // Pick a tap location outside the link area, so we're clicking on the background.
    y = 150;
    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>