4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"../../resources/run-after-layout-and-paint.js"></script>
6 <script src=
"resources/link-highlight-helper.js"></script>
8 <body onLoad=
"runTest();">
9 <iframe id=
"nestingFrame" src=
"resources/1-nested-frame-noncomposited.html" style=
"position: relative; left: 10px; top: 10px; width: 450px; height: 150px; transform: translateZ(0);"></iframe>
10 <div style=
"position: relative; left: 10px; top: 20px;">
11 This test is successful if
"Target Link" is covered by a green box with square corners,
12 and the inner frame is partially scrolled.
17 var nestingFrame
= document
.getElementById('nestingFrame');
18 var targetFrame
= nestingFrame
.contentDocument
.getElementById('targetFrame');
19 var clientRect
= targetFrame
.contentDocument
.getElementById('targetLink').getBoundingClientRect();
20 x
= (clientRect
.left
+ clientRect
.right
) / 2;
21 y
= (clientRect
.top
+ clientRect
.bottom
) / 2 + nestingFrame
.getBoundingClientRect().top
+ targetFrame
.getBoundingClientRect().top
;
22 if (window
.testRunner
) {
23 testRunner
.dumpAsTextWithPixelResults();
24 testRunner
.waitUntilDone();
27 if (window
.eventSender
&& window
.testRunner
) {
28 eventSender
.gestureShowPress(x
, y
);
29 runAfterLayoutAndPaint(function() {
30 targetFrame
.style
.webkitTransform
= "translateZ(0)";
31 runAfterLayoutAndPaint(function() {
32 targetFrame
.contentWindow
.scrollTo(0, 20);
33 testRunner
.notifyDone();
37 debug("This test requires DumpRenderTree.");