1<html> 2<link rel="stylesheet" href="../../js/resources/js-test-style.css"> 3<script src="../../js/resources/js-test-pre.js"></script> 4<script src="../../js/resources/js-test-post-function.js"></script> 5<body> 6<iframe style="position:absolute; top:100px; left:100px;" src="./resources/touch-inside-iframe2.html"></iframe> 7<p id="description"></p> 8<div id="console"></div> 9<script type="text/javascript"> 10description('Test iframes receive touches correctly.'); 11 12var touch = null; 13 14function testComplete(event) 15{ 16 touch = event.touches[0]; 17 shouldBe("touch.pageX", "50"); 18 shouldBe("touch.pageY", "50"); 19 isSuccessfullyParsed(); 20 layoutTestController.notifyDone(); 21} 22 23function runTest() { 24 if (window.eventSender) { 25 // Touch the center of the div in the iframe. 26 // 100px is offset to iframe in main frame, 27 // 2px for the iframe border, 50px to get to centre of the div. 28 eventSender.addTouchPoint(152, 152); 29 eventSender.touchStart(); 30 } else { 31 debug('This test requires DRT.'); 32 } 33} 34 35if (window.layoutTestController) { 36 layoutTestController.waitUntilDone(); 37} 38 39var successfullyParsed = true; 40</script> 41</body> 42</html> 43