6 if (!window
.testRunner
|| !window
.eventSender
|| !window
.internals
)
8 testRunner
.dumpAsText();
10 var div
= document
.getElementById("div");
11 var rectList
= div
.getClientRects();
12 window
.internals
.setPageScaleFactor(2);
13 var scaledRectList
= div
.getClientRects();
15 var result
= document
.getElementById("result");
16 var rect
= rectList
[0];
17 var scaledRect
= scaledRectList
[0];
19 if (rect
.left
== scaledRect
.left
&&
20 rect
.top
== scaledRect
.top
&&
21 rect
.right
== scaledRect
.right
&&
22 rect
.bottom
== scaledRect
.bottom
)
23 result
.innerHTML
= "Pass";
25 result
.innerHTML
= "Fail";
30 <body onload=
"testRects();">
31 <div id=
"div" style=
"width:100px; height:100px; background-color:green;"></div>
32 <p id=
"result">This test must be run via DumpRenderTree.
</p>