7 if (!window
.testRunner
|| !window
.eventSender
|| !window
.internals
)
9 testRunner
.dumpAsText();
11 var div
= document
.getElementById("frame").contentDocument
.getElementById("div");
12 var rect
= div
.getClientRects()[0];
13 window
.internals
.setPageScaleFactor(2);
14 var scaledRect
= div
.getClientRects()[0];
16 var result
= document
.getElementById("result");
17 if (rect
.left
== scaledRect
.left
&&
18 rect
.top
== scaledRect
.top
&&
19 rect
.right
== scaledRect
.right
&&
20 rect
.bottom
== scaledRect
.bottom
)
21 result
.innerHTML
= "Pass";
23 result
.innerHTML
= "Fail";
28 <body onload=
"testRects();">
29 <iframe id=
"frame" src=
"resources/client-rect-frame.html" width=
"300" height=
"200"></iframe>
30 <p id=
"result">This test must be run via DumpRenderTree.
</p>