blob: 9012e2eaf598c9dc6cd06dd4f3e80658b07edc6a [file] [log] [blame]
if (window.testRunner)
testRunner.dumpAsText();
function log(s)
{
var results = document.getElementById('results');
results.innerHTML += s + '<br>';
}
function runTest()
{
for (var i = 0; i < hitTestData.length; ++i) {
var test = hitTestData[i];
var hit = document.elementFromPoint(test.point[0], test.point[1]);
if (hit.id == test.target)
log('Element at ' + test.point[0] + ', ' + test.point[1] + ' has id \"' + hit.id + '\": PASS');
else
log('Element at ' + test.point[0] + ', ' + test.point[1] + ' is ' + hit.id + ': FAIL');
}
}