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