blob: 1000ddf56047283bc653fb00f9f824447280b432 [file] [log] [blame]
<html>
<script src="../../../resources/js-test-pre.js"></script>
<body>
<iframe style="position:absolute; top:100px; left:100px;" src="./resources/touch-inside-iframe2.html"></iframe>
<p id="description"></p>
<div id="console"></div>
<script type="text/javascript">
description('Test iframes receive touches correctly.');
var touch = null;
function testComplete(event)
{
touch = event.touches[0];
shouldBe("touch.pageX", "50");
shouldBe("touch.pageY", "50");
isSuccessfullyParsed();
testRunner.notifyDone();
}
function runTest() {
if (window.eventSender) {
// Touch the center of the div in the iframe.
// 100px is offset to iframe in main frame,
// 2px for the iframe border, 50px to get to centre of the div.
eventSender.addTouchPoint(152, 152);
eventSender.touchStart();
} else {
debug('This test requires DRT.');
}
}
if (window.testRunner) {
testRunner.waitUntilDone();
}
</script>
</body>
</html>