blob: 9d7b4ff877ac0fe31ae47cc2d9dca07673ebb94a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Touch Adjustment: bug 82044</title>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/touchadjustment.js"></script>
<style>
#sandbox { position: absolute; left: 0px; top: 0px; width: 400px; height: 200px; }
#div1 { position: absolute; left: 50px; top: 50px; width: 200px; height: 50px;}
#div2 { position: absolute; left: 50px; top: 100px; width: 200px; height: 50px;}
</style>
</head>
<body>
<div id=sandbox>
<div id=div1 onclick=onClick>
Some text.
</div>
<div id=div2>
Some text. <a id=a1 href="#1">A link</a>
</div>
</div>
<p id='description'></p>
<div id='console'></div>
<script>
function onClick() {
}
function testDirectTouches()
{
testTouchPoint(touchPoint(200, 90, 200), document.getElementById('div1'));
}
function runTests()
{
if (window.testRunner && window.internals && internals.touchNodeAdjustedToBestClickableNode) {
description('Test touch-adjustment on a block where we also touch the inner text and outside link.');
testDirectTouches();
document.getElementById('sandbox').style.display = 'none';
}
}
runTests();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>