| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| </head> |
| <body onLoad="runTest();"> |
| <iframe id="targetFrame" src="resources/1-frame-composited.html" style="position: relative; left: 10px; top: 10px; width: 400px; height: 150px;"></iframe> |
| <div style="position: relative; left: 10px; top: 20px;"> |
| This test is successful if "Target Link" is scrolled barely out of view ("Link 4" is at the top of the frame) |
| and the green box with square corners is not visible. |
| </div> |
| <script> |
| function runTest() { |
| var targetFrame = document.getElementById("targetFrame"); |
| var clientRect = targetFrame.contentDocument.getElementById('targetLink').getBoundingClientRect(); |
| x = (clientRect.left + clientRect.right) / 2; |
| y = (clientRect.top + clientRect.bottom) / 2 + targetFrame.getBoundingClientRect().top; |
| if (window.testRunner) { |
| testRunner.dumpAsTextWithPixelResults(); |
| testRunner.waitUntilDone(); |
| } |
| |
| if (window.eventSender) { |
| eventSender.gestureShowPress(x, y); |
| document.getElementById("targetFrame").contentWindow.scrollTo(0, 90); |
| window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| } else { |
| debug("This test requires DumpRenderTree."); |
| } |
| } |
| </script> |
| </body> |
| </html> |