OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body onload="runTest();"> | 6 <body onload="runTest();"> |
7 <div style="position: relative; left: 10px; top: 10px"></div> | 7 <div style="position: relative; left: 10px; top: 10px"></div> |
8 <div id="outerDiv" style="position: relative; left: 10px; top: 40px; width: 300p
x; height: 150px; overflow-y: scroll; overflow-x: scroll;"> | 8 <div id="outerDiv" style="position: relative; left: 10px; top: 40px; width: 300p
x; height: 150px; overflow-y: scroll; overflow-x: scroll;"> |
9 <div id="targetDiv" style="position: relative; left: 10px; top: i10px; width:
200px; height: 100px; overflow-y: scroll; overflow-x: scroll;"> | 9 <div id="targetDiv" style="position: relative; left: 10px; top: i10px; width:
200px; height: 100px; overflow-y: scroll; overflow-x: scroll;"> |
10 <div style="-webkit-transform: translateZ(0)"> | 10 <div style="-webkit-transform: translateZ(0)"> |
(...skipping 12 matching lines...) Expand all Loading... |
23 </div> | 23 </div> |
24 <div style="position: relative; left: 10px; top: 80px"> | 24 <div style="position: relative; left: 10px; top: 80px"> |
25 This test is successful if "Target Link" above is covered in a transparent green
rectangle with rounded corners. | 25 This test is successful if "Target Link" above is covered in a transparent green
rectangle with rounded corners. |
26 </div> | 26 </div> |
27 <script> | 27 <script> |
28 function runTest() { | 28 function runTest() { |
29 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); | 29 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
30 x = (clientRect.left + clientRect.right) / 2; | 30 x = (clientRect.left + clientRect.right) / 2; |
31 y = (clientRect.top + clientRect.bottom) / 2; | 31 y = (clientRect.top + clientRect.bottom) / 2; |
32 if (window.testRunner) { | 32 if (window.testRunner) { |
33 testRunner.dumpAsText(true); | 33 testRunner.dumpAsTextWithPixelResults(); |
34 testRunner.waitUntilDone(); | 34 testRunner.waitUntilDone(); |
35 } | 35 } |
36 | 36 |
37 if (window.eventSender) { | 37 if (window.eventSender) { |
38 eventSender.gestureTapDown(x, y); | 38 eventSender.gestureTapDown(x, y); |
39 document.getElementById('targetDiv').scrollTop += 20; | 39 document.getElementById('targetDiv').scrollTop += 20; |
40 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); | 40 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
41 } else { | 41 } else { |
42 debug("This test requires DumpRenderTree."); | 42 debug("This test requires DumpRenderTree."); |
43 } | 43 } |
44 } | 44 } |
45 </script> | 45 </script> |
46 </script> | 46 </script> |
47 </body> | 47 </body> |
48 </html> | 48 </html> |
OLD | NEW |