blob: dff6c82fe7d920345da3f5cdf730a0f5035df6b2 [file] [log] [blame]
<html>
<head>
<script>
function runTest() {
if (window.testRunner)
testRunner.dumpAsText();
var result = document.getElementById('res');
var input = document.getElementById('tf');
var borderElement = document.elementFromPoint(18, 34); // in border
var paddingElement = document.elementFromPoint(25, 41); // in padding
if (borderElement == input && paddingElement == input)
result.innerHTML = "Test Passed";
}
window.addEventListener('click', function(e) {
window.console.log('page x ' + e.pageX + ' page y ' + e.pageY);
}, false);
</script>
</head>
<body onload="runTest()">
This tests hit testing on the border and padding areas of an input. Clicks in either should hit
the input element.
<input id="tf" style="position: absolute; top: 25px; left: 10px; border: 10px inset gray; padding: 10px;">
<div id="res" style="position: absolute; top: 100px; left: 10px;">Test Failed</div>
</body>
</html>