| <script src="../resources/js-test-pre.js"></script> |
| #div1 { position: absolute; left: 100px; top: 100px; width: 200px; height: 20px; } |
| <body onload="runTests()"> |
| function testRoundTouch(x, y, radius) |
| var zoomableRect = internals.bestZoomableAreaForTouchPoint(x, y, width, height); |
| function testDirectTouches() |
| zoomableArea = testRoundTouch(200, 110, 20); |
| shouldEvaluateTo('zoomableArea.top', 100); |
| shouldEvaluateTo('zoomableArea.left', 100); |
| shouldEvaluateTo('zoomableArea.width', 200); |
| shouldEvaluateTo('zoomableArea.height', 20); |
| if (window.testRunner && window.internals && internals.bestZoomableAreaForTouchPoint) { |
| description('Test that targetted area is picked even if the touch area is not fully contained.'); |
| testRunner.waitUntilDone(); |