Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / elementFromPoint-scaled-scrolled.html
blob5db1077599c36a74c93667e577eb5bbff32fa71d
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body onload="runTest();" style="width:2000px;height:2000px;margin:0px;padding:100px">
6 <button style="width:50px;height:50px;">B1</button><button style="width:50px;height:50px;">B2</button><button style="width:50px;height:50px;">B3</button>
7 <div>This test is successful if elementFromPoint returns the correct element.</div>
8 <div id="result"></div>
9 <script>
10 function runTest() {
11 // Scroll before scaling so we scroll the layout viewport rather than the visual.
12 window.scrollTo(100,100);
13 if (window.internals)
14 window.internals.setPageScaleFactor(2);
16 if (window.testRunner)
17 testRunner.dumpAsText();
19 document.getElementById("result").innerText = document.elementFromPoint(125, 25).innerText;
21 </script>
22 </script>
23 </body>
24 </html>