Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: LayoutTests/touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset.html

Issue 13818029: Remove TiledBacking / TileCache code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../fast/js/resources/js-test-pre.js"></script>
4 <style>
5 #scrolloffsetcontainer {
6 position: absolute;
7 top: 500px;
8 height: 1000px;
9 }
10 body {
11 margin: 0px;
12 }
13 </style>
14 </head>
15 <body onload="runTests()">
16
17 <div id=scrolloffsetcontainer>
18 <iframe frameborder='0px' src='data:text/html,
19 <html>
20 <head>
21 <style>
22 #div0 { position: absolute; left: 50px; top: 50px; width: 300px; height: 300px; box-sizing: border-box; }
23 #div1 { position: absolute; left: 50px; top: 50px; width: 200px; height: 100px; box-sizing: border-box; }
24 </style>
25 </head>
26 <body>
27 <div id=div0>
28 <div id=div1></div>
29 </div>
30 </body>
31 </html>'>
32 </iframe>
33 <p id='description'></p>
34 <div id='console'></div>
35 </div>
36
37 <script>
38 function testRoundTouch(x, y, radius)
39 {
40 var x = x - radius;
41 var y = y - radius;
42 var width = radius * 2;
43 var height = radius * 2;
44 var zoomableRect = internals.bestZoomableAreaForTouchPoint(x, y, width, height, document);
45 return zoomableRect;
46 }
47
48 function testDirectTouches()
49 {
50 zoomableArea = testRoundTouch(100, 600, 10);
51 shouldEvaluateTo('zoomableArea.top', 600);
52 shouldEvaluateTo('zoomableArea.left', 100);
53 shouldEvaluateTo('zoomableArea.width', 200);
54 shouldEvaluateTo('zoomableArea.height', 100);
55 }
56
57 function runTests()
58 {
59 if (window.testRunner && window.internals && internals.touchNodeAdjusted ToBestClickableNode && internals.setDelegatesScrolling) {
60 description('Test iframe with main frame scroll offset case of tap-t o-zoom mechanics.');
61 window.scrollBy(0,500);
62 internals.setDelegatesScrolling(true, document);
63 testRunner.dumpAsText();
64 testRunner.waitUntilDone();
65 testDirectTouches();
66 isSuccessfullyParsed();
67 testRunner.notifyDone();
68 }
69 }
70 </script>
71 </body>
72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698