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