6 testRunner
.dumpAsText();
8 var result
= document
.getElementById('res');
9 var input
= document
.getElementById('tf');
11 var borderElement
= document
.elementFromPoint(18, 34); // in border
12 var paddingElement
= document
.elementFromPoint(25, 41); // in padding
14 if (borderElement
== input
&& paddingElement
== input
)
15 result
.innerHTML
= "Test Passed";
18 window
.addEventListener('click', function(e
) {
19 window
.console
.log('page x ' + e
.pageX
+ ' page y ' + e
.pageY
);
23 <body onload=
"runTest()">
24 This tests hit testing on the border and padding areas of an input. Clicks in either should hit
26 <input id=
"tf" style=
"position: absolute; top: 25px; left: 10px; border: 10px inset gray; padding: 10px;">
27 <div id=
"res" style=
"position: absolute; top: 100px; left: 10px;">Test Failed
</div>