Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / touchadjustment / zoom-fatfinger.html
blob7dc7678e02c0585ef46916a1cc3d19abde10cc1b
1 <html>
2 <head>
3 <script src="../resources/js-test.js"></script>
4 <style>
5 #div1 { position: absolute; left: 100px; top: 100px; width: 200px; height: 20px; }
6 </style>
7 </head>
8 <body onload="runTests()">
10 <div id=div1></div>
12 <p id='description'></p>
13 <div id='console'></div>
15 <script>
16 function testRoundTouch(x, y, radius)
18 var x = x - radius;
19 var y = y - radius;
20 var width = radius * 2;
21 var height = radius * 2;
22 var zoomableRect = internals.bestZoomableAreaForTouchPoint(x, y, width, height, document);
23 return zoomableRect;
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);
36 function runTests()
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();
42 testDirectTouches();
43 isSuccessfullyParsed();
44 testRunner.notifyDone();
47 </script>
48 </body>
49 </html>