3 <script src=
"../resources/js-test.js"></script>
5 #div1 { position: absolute; left:
100px; top:
100px; width:
200px; height:
20px; }
8 <body onload=
"runTests()">
12 <p id='description'
></p>
13 <div id='console'
></div>
16 function testRoundTouch(x
, y
, radius
)
20 var width
= radius
* 2;
21 var height
= radius
* 2;
22 var zoomableRect
= internals
.bestZoomableAreaForTouchPoint(x
, y
, width
, height
, document
);
26 function testDirectTouches()
28 zoomableArea
= testRoundTouch(200, 110, 20);
29 shouldEvaluateTo('zoomableArea.top', 100);
30 shouldEvaluateTo('zoomableArea.left', 100);
31 shouldEvaluateTo('zoomableArea.width', 200);
32 shouldEvaluateTo('zoomableArea.height', 20);
38 if (window
.testRunner
&& window
.internals
&& internals
.bestZoomableAreaForTouchPoint
) {
39 description('Test that targetted area is picked even if the touch area is not fully contained.');
40 testRunner
.dumpAsText();
41 testRunner
.waitUntilDone();
43 isSuccessfullyParsed();
44 testRunner
.notifyDone();