Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / scale-page-client-rects.html
blobc59122ba2c079ca174e1c324eca85a3a841c5820
1 <html>
2 <head>
3 <script>
4 function testRects()
6 if (!window.testRunner || !window.eventSender || !window.internals)
7 return;
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";
24 else
25 result.innerHTML = "Fail";
27 </script>
28 </head>
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>
33 </body>
34 </html>